結果
問題 | No.889 素数! |
ユーザー |
|
提出日時 | 2020-11-08 18:10:29 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 103 ms / 2,000 ms |
コード長 | 396 bytes |
コンパイル時間 | 395 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-07-22 15:34:13 |
合計ジャッジ時間 | 8,384 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 61 |
コンパイルメッセージ
Syntax OK
ソースコード
# 素数 A = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67] # 平方数 B = [4, 9, 16, 25, 36, 49, 64] # 立法数 C = [8, 27, 64] # 完全数 D = [6, 28] # 入力 E = gets.to_i s = E.to_s if A.include?(E) then s = "Sosu!" elsif B.include?(E) then s = "Heihosu!" elsif C.include?(E) then s = "Ripposu!" elsif D.include?(E) then s = "Kanzensu!" end puts s