Nemo048

Untitled

Jul 17th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ForLessons
  8. {
  9.     /*
  10.      *  persistence(39) == 3    // because 3*9 = 27, 2*7 = 14, 1*4=4
  11.                                 // and 4 has only one digit
  12.  
  13.         persistence(999) == 4   // because 9*9*9 = 729, 7*2*9 = 126,
  14.                                 // 1*2*6 = 12, and finally 1*2 = 2
  15.  
  16.         persistence(4) == 0     // because 4 is already a one-digit number
  17.      * */
  18.     class Program
  19.     {
  20.         static void Main(string[] args)
  21.         {
  22.            
  23.         }
  24.         public static int Persistence(long n)
  25.         {
  26.             // your code
  27.            
  28.             return 0;
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment