結果

問題 No.2814 Block Game
ユーザー 👑 rin204
提出日時 2024-07-19 22:19:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 854 ms / 2,000 ms
コード長 306 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 77,156 KB
最終ジャッジ日時 2024-07-19 22:19:26
合計ジャッジ時間 18,722 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve(n, S):
    if bin(n).count("1") == 1:
        if (n <= 2) ^ (S == "Even"):
            print("Alice")
        else:
            print("Bob")
    elif n % 2 == 1:
        print("Alice")
    else:
        print("Bob")


for _ in range(int(input())):
    n, S = input().split()
    solve(int(n), S)
0