来自50分的求助qwq
查看原帖
来自50分的求助qwq
855779
Kuangxirui楼主2023/5/30 13:01
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int x,s;
	char n;
	cin>>x>>n;
	if(x<=1000){
		s=8;
		if(n='y'){
			s=s+5;
		}
	}
	if(x>1000){
		s=8;
		if(x%500==0){
		x=x-1000;
	    s=s+(x/500)*4;
	}
	else{
		x=x-1000;
		s=s+(x/500+1)*4; 
	}
	if(n='y'){
		s=s+5;
	}
	}
	cout<<s;
return 0;
}
2023/5/30 13:01
加载中...