結果
問題 | No.103 素因数ゲーム リターンズ |
ユーザー |
|
提出日時 | 2023-06-27 19:42:51 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 483 bytes |
コンパイル時間 | 94 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-04 12:16:19 |
合計ジャッジ時間 | 1,919 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 WA * 1 |
other | AC * 14 WA * 6 |
ソースコード
def Prime(n):p = 2q = 0ans = []while p <= n**0.5:while n % p == 0:n //= pq += 1if q == 0:p += 1continueans.append([p,q])p += 1if n > 1:ans.append([n,1])return ansN = int(input())M = list(map(int,input().split()))G = []for i in range(N):m = M[i]pm = Prime(m)g = 0for p,q in pm:q %= 3g ^= qG.append(g)ans = 0for g in G:ans ^= gif ans != 0:print('Alice')else:print('Bob')