結果
問題 | No.103 素因数ゲーム リターンズ |
ユーザー |
|
提出日時 | 2023-06-27 19:42:20 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 499 bytes |
コンパイル時間 | 79 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-07-04 12:15:21 |
合計ジャッジ時間 | 1,565 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 5 |
other | WA * 20 |
ソースコード
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 = []print(Prime(4))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')