|
|
back to boardWhy? #include <iostream> int main() { int n,k,a; std::cin>>n>>k; if ((2*n)%k==0) a=(2*n-(2*n)%k)/k; else a=(2*n-(2*n)%k)/k+1; std::cout<<a; return 0; } wrong answer po4emu ne pravilno, ved algoritm verni? Edited by author 25.10.2012 22:40 Edited by author 25.10.2012 22:40 Re: Why? Posted by Fazil 5 Nov 2012 14:33 if ((n%k)*2<=k) {answer=3;} |
|
|