結果
問題 | No.103 素因数ゲーム リターンズ |
ユーザー |
|
提出日時 | 2023-05-21 11:09:40 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 67 ms / 5,000 ms |
コード長 | 604 bytes |
コンパイル時間 | 295 ms |
コンパイル使用メモリ | 82,044 KB |
実行使用メモリ | 63,104 KB |
最終ジャッジ日時 | 2024-12-21 18:55:10 |
合計ジャッジ時間 | 2,730 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 20 |
ソースコード
gru = [0]*(11)for i in range(1,11):me = []for j in range(1,3):if i-j >= 0:me.append(gru[i-j])ans = 0while ans in me:ans+=1gru[i] = ansn = int(input())m = list(map(int,input().split()))from collections import defaultdictwe = 0for i in m:nd = defaultdict(int)con = 2while con**2 <= i:if i%con == 0:nd[con] +=1i /= conelse:con+=1if i != 1:nd[i]+=1ans = 0for j in nd:ans = ans^gru[nd[j]]we = we^ansprint("Alice" if we != 0 else "Bob")