#include<iostream> #include<cstdio> using namespace std; int main() { int a,c=0;; char b; cin>>a>>b; if(a<=1000) { c=8; } if(a>1000) { c=8; a=a-1000; if(a%500==0){ c=c+a/500*4; } else{ c=c+(a/500+1)*4; } } if(b=='y') { c+=5; } cout<<c; return 0; }
注册一个 TeMenHu 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 TeMenHu 通用账户