-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbee1836.cpp
More file actions
39 lines (31 loc) · 813 Bytes
/
Copy pathbee1836.cpp
File metadata and controls
39 lines (31 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* Contest : Beecrowd
* Problem : 1836 - Pokémon!
* Link : https://judge.beecrowd.com/pt/problems/view/1836
*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fastio ios::sync_with_stdio(0); cin.tie(0);
int caseNum = 0;
void solve() {
vector<string> atr = {"HP", "AT", "DF", "SP"};
ll L, Bs, IV, EV;
string pokemon;
cin >> pokemon >> L;
cout << "Caso #" << ++caseNum << ": " << pokemon << " nivel " << L << '\n';
for (int i = 0; i < 4; ++i) {
cin >> Bs >> IV >> EV;
cout << atr[i] << ": ";
if (i == 0) {
cout << (int)((IV + Bs + sqrt(EV) / 8 + 50) * L) / 50 + 10 << '\n';
} else
cout << (int)((IV + Bs + sqrt(EV) / 8) * L) / 50 + 5 << '\n';
}
}
int main() {
fastio
int tc; cin >> tc;
while (tc--) solve();
return 0;
}