1 条题解
-
0
显然当 为奇数时 Alice 胜, 为偶数时平局。所以我们需要判断 的奇偶性。
因为 很大,所以我们直接读入字符串,取它的最后一位,判断它的奇偶性即可。
// std 100pts #include<bits/stdc++.h> using namespace std; #define endl '\n' void solve() { string s; cin >> s; int back_num = s.back() - '0'; if (back_num % 2 == 1) cout << "Alice" << endl; else cout << "Draw" << endl; } int main() { freopen("game.in","r",stdin); freopen("game.out","w",stdout); ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); int T; cin >> T; while (T--) solve(); return 0; }
信息
- ID
- 513
- 时间
- 1000ms
- 内存
- 512MiB
- 难度
- 6
- 标签
- (无)
- 递交数
- 43
- 已通过
- 14
- 上传者