50分,246910点WA
查看原帖
50分,246910点WA
716599
TheCliffSwallow楼主2022/5/21 17:58
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main()
{
	char y;
	int x,ans=8;
	cin>>x>>y;
	if(y='y')	ans+=5;//加急 
	x-=1000;//若小于1000,则直接输出。大于1000进入循环 
	while(x>0)
	{
		x-=500;
		ans+=4;
	}
	cout<<ans;
	return 0;
}
2022/5/21 17:58
加载中...