题解 | 牛牛的快递
牛牛的快递
https://www.nowcoder.com/practice/41b42e7b3c3547e3acf8e90c41d98270
//最简洁的代码
#include <bits/stdc++.h>
using namespace std;
int main() {
float a;
char b;
cin>>a>>b;
int money=20;
if(b=='y')money+=5;
if(a>1){
money+=ceil(a-1);
}
cout<<money<<endl;
return 0;
}
查看11道真题和解析

