|
|
back to board[JAVA] Where is my mistake? import java.util.*; public class TimusUralBif { int n; int k; int clock; public static void main(String [] args) { TimusUralBif b=new TimusUralBif(); Scanner in=new Scanner(System.in); b.n=in.nextInt(); if(b.n<1 || b.n>1000) return;
b.k=in.nextInt(); if(b.k<1 || b.k>1000) return;
if(b.n%b.k==0) b.clock=((b.n/b.k)*2); else if(b.n/b.k==1) b.clock=b.n%b.k+2; else if(b.k>b.n) b.clock=2; else b.clock=b.n%b.k+2+(b.n/b.k);
System.out.print(+b.clock); } } Help me, please :( Edited by author 05.06.2012 18:21 Re: Where is my mistake? Posted by Neofit 5 Jun 2012 12:03 Write your e-mail. I help you. Re: Where is my mistake? try test 9 5 ans: 4 Re: Where is my mistake? ice.couples@gmail.com Neofit thank you Edited by author 05.06.2012 14:45 |
|
|