結果
| 問題 | No.103 素因数ゲーム リターンズ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-25 23:56:49 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 69 ms / 5,000 ms |
| + 89µs | |
| コード長 | 513 bytes |
| 記録 | |
| コンパイル時間 | 239 ms |
| コンパイル使用メモリ | 95,984 KB |
| 実行使用メモリ | 83,504 KB |
| 最終ジャッジ日時 | 2026-08-24 07:21:48 |
| 合計ジャッジ時間 | 3,607 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 20 |
ソースコード
import sys
input = sys.stdin.readline
def factorize(n):
fct = []
for i in range(2, int(n**0.5)+1):
c = 0
while n%i==0:
n //= i
c += 1
if c>0:
fct.append((i, c))
if n>1:
fct.append((n, 1))
return fct
N = int(input())
M = list(map(int, input().split()))
G = 0
for Mi in M:
fct = factorize(Mi)
for _, c in fct:
G ^= c%3
if G==0:
print('Bob')
else:
print('Alice')