| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
错在哪里import java.util.Scanner;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
double sum=1;
Scanner m=new Scanner(System.in);
int a=m.nextInt();
int b=m.nextInt();
if(a==0&&b==1){
System.out.println(b+" "+"divides"+" "+a+"!");
}
if(a==0&&b!=1){
System.out.println(b+" "+"does not divide"+" "+a+"!");
}
if(b>0&& a>0){
for(int i=1;i<=a;i++){
sum=sum*i;
}
if(sum%b==0){
System.out.println(b+" "+"divides"+" "+a+"!");
}
else{
System.out.println(b+" "+"does not divide"+" "+a+"!");
}
}
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator