通过代码:
#include <bits/stdc++.h> using namespace std; int n; char s; int main() { scanf("%d %c", &n, &s); if(n < 1000) n = 8; else n = 8 + 4 * (double)ceil((n - 1000) / 500.0); printf("%d", n + 5 * (bool)(s == 'y')); return 0; }
1052:计算邮资
最新推荐文章于 2024-08-15 14:31:25 发布