50分求助!!!
  • 板块B2048 计算邮资
  • 楼主L__B
  • 当前回复1
  • 已保存回复1
  • 发布时间2023/10/18 18:25
  • 上次更新2023/11/2 13:02:50
查看原帖
50分求助!!!
995569
L__B楼主2023/10/18 18:25
#include<bits/stdc++.h>
using namespace std;
int x,s=8; char c;
int main(){
    scanf("%d%c",&x,&c);
    if(x>1000){
        x-=1000,s+=(x/500)*4;
        if(x%500!=0) s+=4;
    }
    if(c=='y') s+=5;
    printf("%d",s);
    return 0;
}
2023/10/18 18:25
加载中...