|
|
back to boardCommon BoardPlease tell me where is wrong with this program for problem1120 #include <iostream.h> int main() { long n,a,b=2,p; cin>>n; while (n%2==0) { n/=2;b*=2; } p=n; a=(b+1-n)/2; if (a<1){p=b;a=(n+1-b)/2;} cout <<a<<" "<<p; return (0); } |
|
|