import java.util.*;
class Main
{
public void main(String[] args)
{
int zeros=0;
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
for(int i=0;i<n;i++)
{
int a=sc.nextInt();
while(a>0)
{
a=a/5;
zeros=zeros+a;
}
System.out.println(zeros);
zeros=0;
}
}
}
HEy main should be
public Static void main(String[] args) you forgot static
1 Like
I changed it to public static void main(String ags[]) and it got AC. Here is link
1 Like
tilila
4
You need to add this line : import java.util.Scanner; in the top of your code.
codechef says “spoj: compilation successfull.main class not found in the program containing main(String[] args)”.