uva 10499 - The Land of Justice
2014-01-10 20:18
429 查看
感觉很简单的一题,但是wa了两次,还是看了网上的代码才知道,虽然N是int型的,但是25*n就不一定是了,改成long就行了
#include<iostream> using namespace std; int main(){ long n; while(cin>>n){ if(n<0) break; if(n==1){ cout<<"0%"<<endl; continue; } cout<<n*25<<"%"<<endl; } }
相关文章推荐
- UVA - 10499 The Land of Justice
- UVA 10499 The Land of Justice
- UVA - 10499 The Land of Justice
- UVa 10499 - The Land of Justice
- UVA10499- The Land of Justice
- UVA 10499 The Land of Justice
- UVA 10499-The Land of Justice
- UVA - 10499 The Land of Justice
- UVa_10499 - The Land of Justice
- UVA 10499 - The Land of Justice(数学)
- UVA 10499 The Land of Justice
- uva 10499 The Land of Justice
- UVa 10499 - The Land of Justice
- uva 10499 The Land of Justice
- UVA 10499 (暑假-数学 -H - The Land of Justice)
- uva-10499 - The Land of Justice
- uva 10499 The Land of Justice
- UVa 10499 - The Land of Justice
- UVA - 10499 The Land of Justice
- uva 10499 - The Land of Justice