提交时间:2021-05-22 21:18:14
运行 ID: 141
#include <iostream> #include <cstdio> using namespace std; int main(){ int n,jiaji; cin>>n>>jiaji; int cost; if(n<=1000){ cost=8; } if(n>1000){ if((n-1000)%500==0){ cost=cost+(n-1000)/500*4; }else{ cost=cost+(n-1000)/500*4+4; } } if(jiaji==1){ cost=cost+5; } }