結果
問題 |
No.2 素因数ゲーム
|
ユーザー |
![]() |
提出日時 | 2019-03-18 06:05:19 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 547 bytes |
コンパイル時間 | 181 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 16,640 KB |
最終ジャッジ日時 | 2024-07-16 00:24:05 |
合計ジャッジ時間 | 7,083 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 8 TLE * 1 -- * 22 |
ソースコード
N = int(input()) p_list = list() c_list = list() prime = [2, 0] while N != 1: while N%prime[0] == 0: N = int(N/prime[0]) prime[1] += 1 p_list.append(prime[0]) c_list.append(prime[1]) if N == 1: break prime[1] = 0 while True: prime[0] += 1 flg = 0 for p in p_list: if prime[0]%p == 0: flg = 1 break if flg == 0: break ans = 0 for c in c_list: ans = ans ^ c if ans == 0: print('Bob') else: print('Alice')