結果
| 問題 | No.3845 eval("G4M3") |
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2026-12-03 03:42:02 |
| 結果 |
AC
不安定
|
| 実行時間 | 393 ms / 2,000 ms |
| + 766µs | |
| コード長 | 316 bytes |
| 記録 | |
| コンパイル時間 | 83 ms |
| コンパイル使用メモリ | 64,668 KB |
| 実行使用メモリ | 62,848 KB |
| 最終ジャッジ日時 | 2026-12-03 03:42:12 |
| 合計ジャッジ時間 | 8,824 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 49 |
ソースコード
for _ in range(int(input())):
n = int(input())
s = [int(c) % 2 for c in input()]
if n % 2:
ans = s[0] != s[-1] and all(s[i] * s[i+1] == 0 for i in range(n - 1))
else:
ans = not (s[0] == s[-1] == 0 and all(s[i] * s[i+1] == 0 for i in range(n - 1)))
print('Alice' if ans else 'Bob')
Kude