10分求解
  • 板块B2048 计算邮资
  • 楼主BH3rd
  • 当前回复2
  • 已保存回复2
  • 发布时间2023/6/7 09:50
  • 上次更新2023/10/23 13:46:55
查看原帖
10分求解
715162
BH3rd楼主2023/6/7 09:50
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int x,y;
	char a;
	cin>>x>>a;
	y=x%500;
	if(y!=0) 
	{
		x=x/500+1;
	}
	if(a==121) 
	{
		cout<<x*8+5;
	}
	else 
	{
		cout<<x*8;
	}
	return 0;
}
2023/6/7 09:50
加载中...