You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
428 B
28 lines
428 B
2 years ago
|
#include <bits/stdc++.h>
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
char chr;
|
||
|
int n;
|
||
|
cin >> chr >> n;
|
||
|
switch (chr)
|
||
|
{
|
||
|
case 'P':
|
||
|
cout << n * 0.7 << endl;
|
||
|
break;
|
||
|
case 'G':
|
||
|
cout << n * 0.8 << endl;
|
||
|
break;
|
||
|
case 'S':
|
||
|
cout << n * 0.9 << endl;
|
||
|
break;
|
||
|
|
||
|
default:
|
||
|
cout << n * 0.95 << endl;
|
||
|
break;
|
||
|
}
|
||
|
return 0;
|
||
|
}
|