結果
| 問題 |
No.2 素因数ゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-03 09:56:49 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 5,000 ms |
| コード長 | 288 bytes |
| コンパイル時間 | 100 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-10-12 19:36:29 |
| 合計ジャッジ時間 | 1,999 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
import math
n = int(input())
ans = 0
for i in range(2, int(math.sqrt(n)) + 1):
if n % i == 0:
count = 0
while n % i == 0:
n //= i
count += 1
ans ^= count
if n != 1:
ans ^= 1
if ans == 0:
print("Bob")
else:
print("Alice")