1 solutions
-
0
#include<bits/stdc++.h> using namespace std; int func(int a,int b,int c,int x) { int q=x/(a+c); int r=x%(a+c); return (q*a+min(a,r))*b; } int main() { int a,b,c,d,e,f,x; cin>>a>>b>>c>>d>>e>>f>>x; int ta=func(a,b,c,x); int ak=func(d,e,f,x); if(ta>ak) { cout<<"Takahashi"; } else if(ta<ak) { cout<<"Aoki"; } else { cout<<"Draw"; } return 0; }
Information
- ID
- 2458
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 4
- Accepted
- 1
- Uploaded By