#include <bits/stdc++.h> using namespace std; int main() { int a=0,b=0; char c=0; cin>>a>>c; b=8; a=a-1000; if(a>0) { b=b+(a/500)*4; if(a%500>0) { b=b+4; } } if(c=='y') { b=b+5; } cout<<b<<endl; return 0; }
By signing up a 羽润编程 universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 羽润编程 universal account