|
|
вернуться в форум#include <iostream.h> int main() { unsigned int n,m; //when this is long i get WA cin>>n>>m; if (n<=m) cout<<2*(n-1); else cout<<2*m-1; return 0; } But why do you think tha's strange? You write 2*(n-1) in your code, thus, since n<2^31, 2*(n-1) could be close to 2^32, and you are to use unsigned. |
|
|