結果
問題 | No.889 素数! |
ユーザー | roaris |
提出日時 | 2019-09-20 21:37:01 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 42 ms / 2,000 ms |
コード長 | 391 bytes |
コンパイル時間 | 436 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 51,968 KB |
最終ジャッジ日時 | 2024-09-14 16:48:38 |
合計ジャッジ時間 | 4,843 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 61 |
ソースコード
N = int(input()) if N in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61]: print('Sosu!') elif N in [4, 9, 16, 25, 36, 49]: print('Heihosu!') elif N in [8, 27]: print('Ripposu!') else: cnt = 0 for i in range(1, N): if N % i == 0: cnt += i if N != 0 and cnt == N: print('Kanzensu!') else: print(N)