33 lines
636 B
C++
33 lines
636 B
C++
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
|
|
int main(){
|
|
ios::sync_with_stdio(0);
|
|
cin.tie(0);
|
|
|
|
int a, b, c, d, e, f, x;
|
|
cin >> a >> b >> c >> d >> e >> f >> x;
|
|
|
|
int t_loops = x / (a + c);
|
|
int a_loops = x / (d + f);
|
|
|
|
int t_rest = x - t_loops * (a + c);
|
|
int a_rest = x - a_loops * (d + f);
|
|
|
|
int taka = t_loops * b * a + b * min(t_rest, a);
|
|
int aoki = a_loops * e * d + e * min(a_rest, d);
|
|
|
|
if(taka > aoki){
|
|
cout << "Takahashi" << endl;
|
|
} else if(aoki > taka){
|
|
cout << "Aoki" << endl;
|
|
} else{
|
|
cout << "Draw" << endl;
|
|
}
|
|
|
|
cout << flush;
|
|
|
|
return 0;
|
|
} |