結果
問題 | No.312 置換処理 |
ユーザー |
|
提出日時 | 2016-02-16 18:32:46 |
言語 | Python2 (2.7.18) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 412 bytes |
コンパイル時間 | 48 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 07:17:56 |
合計ジャッジ時間 | 2,176 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 40 WA * 5 |
ソースコード
#coding: utf-8#yuki_312def prime_decomp(n):i = 2table = []while i * i <= n:while n % i == 0:n /= itable.append(i)i += 1if n > 1:table.append(n)return tablen=int(raw_input())s=prime_decomp(n)if s[-1]==2:print 4elif s[0]==2 and s[1]==2:if s[2]<4:print 3else:print 4elif s[0]==2:i=0while s[i]==2:i+=1continueprint s[i]else:print s[0]