17 lines
337 B
C++
17 lines
337 B
C++
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
//cin读入优化
|
|
std::ios::sync_with_stdio(false);
|
|
int n;
|
|
char jiaji;
|
|
int sum = 8;
|
|
cin >> n >> jiaji;
|
|
|
|
if (n >= 1000) sum += ceil(1.0 * (n - 1000) / 500) * 4;
|
|
if (jiaji == 'y') sum += 5;
|
|
cout << sum << endl;
|
|
return 0;
|
|
} |