結果
問題 | No.2814 Block Game |
ユーザー |
|
提出日時 | 2024-07-20 13:29:18 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 341 ms / 2,000 ms |
コード長 | 663 bytes |
コンパイル時間 | 206 ms |
コンパイル使用メモリ | 81,840 KB |
実行使用メモリ | 90,396 KB |
最終ジャッジ日時 | 2024-07-20 13:29:28 |
合計ジャッジ時間 | 9,436 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 20 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random#sys.setrecursionlimit(10**9)#sys.set_int_max_str_digits(0)#input = sys.stdin.readline#n = int(input())##alist = []#s = input()input = sys.stdin.readlinet = int(input())x = [1<<i for i in range(70)]for i in range(t):n,s = input().split()n =int(n)if n % 2 == 0 or n == 1:if n in x:a = ((n+1)*n//2) % 2if (a == 0 and s == 'Even') or (a == 1 and s == 'Odd'):print('Alice')else:print('Bob')else:print('Bob')else:print('Alice')