結果
問題 |
No.2 素因数ゲーム
|
ユーザー |
|
提出日時 | 2020-02-24 18:01:29 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 105 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-10-12 06:34:15 |
合計ジャッジ時間 | 1,889 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 28 |
ソースコード
#!/usr/env/bin python import math n = int(input()) ceil = math.ceil(n ** 0.5) xor = 0 for x in range(2, ceil + 1): count = 0 while n % x == 0: n /= x count += 1 if count != 0: print(f"{x}^{count}") xor ^= count if n > 1: xor ^= 1 if xor: print("Alice") else: print("Bob")