結果
問題 | No.312 置換処理 |
ユーザー |
![]() |
提出日時 | 2017-05-18 16:43:31 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 103 ms / 2,000 ms |
コード長 | 273 bytes |
コンパイル時間 | 491 ms |
コンパイル使用メモリ | 7,072 KB |
実行使用メモリ | 6,400 KB |
最終ジャッジ日時 | 2024-11-15 12:16:04 |
合計ジャッジ時間 | 2,228 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 45 |
ソースコード
n = int(raw_input())l = []if n % 2 == 0 and n/2 >= 3:l.append(n/2)if n % 4 == 0:l.append(4)d = 3while d * d <= n:if n % d == 0:l.append(d)l.append(n/d)breakd += 2if l != []:l.sort()print l[0]else:print n