Submission #31179953
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c,d,e,f,x;
cin >> a >> b >> c >> d >> e >> f >> x;
int Takahashi, Aoki;
Takahashi = (x / (a + c) * a + min(x%(a+c), a) ) * b;
Aoki = (x / (d + f) * d + min(x%(d+f), d) ) * e;
string winner = "";
if (Takahashi == Aoki ){
winner = "Draw";
}
else if (Takahashi > Aoki){
winner = "Takahashi";
}
else{
winner = "Aoki";
}
cout << winner << endl;
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Jogging |
| User | nullpoint |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 482 Byte |
| Status | AC |
| Exec Time | 8 ms |
| Memory | 3580 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example_00.txt, example_01.txt, example_02.txt |
| All | example_00.txt, example_01.txt, example_02.txt, handmade.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| example_00.txt | AC | 8 ms | 3572 KiB |
| example_01.txt | AC | 2 ms | 3476 KiB |
| example_02.txt | AC | 2 ms | 3560 KiB |
| handmade.txt | AC | 2 ms | 3508 KiB |
| test_00.txt | AC | 3 ms | 3580 KiB |
| test_01.txt | AC | 2 ms | 3512 KiB |
| test_02.txt | AC | 2 ms | 3500 KiB |
| test_03.txt | AC | 2 ms | 3388 KiB |
| test_04.txt | AC | 2 ms | 3568 KiB |
| test_05.txt | AC | 2 ms | 3468 KiB |
| test_06.txt | AC | 2 ms | 3512 KiB |
| test_07.txt | AC | 3 ms | 3464 KiB |
| test_08.txt | AC | 2 ms | 3448 KiB |
| test_09.txt | AC | 2 ms | 3456 KiB |