-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunctions.java
More file actions
69 lines (59 loc) · 1.57 KB
/
Functions.java
File metadata and controls
69 lines (59 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import java.util.Scanner;
public class Functions {
static int amstrongnumber(int n){
int count=0;
while(n>0){
count++;
n=n/10;
}return count;
}
static boolean samstong(int n){
int cod = countDigits(n);
long sum=0,copy_n=n;
while(n>0){
int d =n%10;
sum = sum + (int)Math.pow(, d)
}
}
// static int getproduct(int a,int b){
// return a*b;
// }
// static void printproduct(int x,int y){
// System.out.println(x*y);
// }
// static long factorial(int n){
// long fact =1;
// for(int i=2;i<=n;i++){
// fact=fact*i;
// }
// return fact;
// }
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
// for(int i=1;i<=n;i++){
// int rev = n%10;
// count=count+1;
// n=n/10;
// }
int ans = amstrongnumber(123);
System.out.println(ans);
// int r = sc.nextInt();
// long fact=1,fact2=1,fact3=1;
// for(int i=2;i<=n;i++){
// fact=fact*i;
// }
// for(int i=2;i<=r;i++){
// fact2=fact2*i;
// }
// for(int i=2;i<=n-r;i++){
// fact3=fact3*i;
// }
// long n_fact = factorial(n);
// System.out.println(fact/(fact2*fact3));
// long prod = product(n,r);
// System.out.println(prod);
// printproduct(2, 4);
// System.out.println( Math.floor(4.8));
}
}