結果

問題 No.103 素因数ゲーム リターンズ
ユーザー 前田悠真
提出日時 2025-06-06 19:13:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 287 bytes
コンパイル時間 530 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 59,392 KB
最終ジャッジ日時 2025-06-06 19:13:32
合計ジャッジ時間 3,006 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
M = list(map(int, input().split()))

ans = 0
for i in range(n):
  m = M[i]
  t = []
  for j in range(2, int(m**0.5)+1):
    cnt = 0
    while m%j==0:
      cnt += 1
      m //= j
    ans ^= cnt%3
  if m!=1:
    ans ^= 1

if ans:
  print('Alice')
else:
  print('Bob')

  
0