結果
問題 |
No.8029 素因数
|
ユーザー |
![]() |
提出日時 | 2017-10-11 12:48:52 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 777 bytes |
コンパイル時間 | 101 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-17 09:22:20 |
合計ジャッジ時間 | 6,437 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 36 WA * 4 |
ソースコード
# coding: utf-8 # Here your code ! def factorization(n): def factor_sub(n, m): c = 0 while n % m == 0: c += 1 n /= m n=n return c, n # buff = [] c, m = factor_sub(n, 2) if c > 0: buff.append((2, c)) c, m = factor_sub(m, 3) if c > 0: buff.append((3, c)) x = 5 while m >= x * x: c, m = factor_sub(m, x) if c > 0: buff.append((x, c)) if x % 6 == 5: x += 2 else: x += 4 if m > 1: buff.append((int(m), 1)) return buff ans=max(factorization(2618041128726310729980397695726420305416084208683943858026180411287263107299803976957264203054160842086839438580))[0]%int(input())%2 if ans==0: print("even") else: print("odd")