結果
問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
ユーザー |
![]() |
提出日時 | 2016-12-28 19:24:57 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 306 bytes |
コンパイル時間 | 303 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-12-15 07:58:04 |
合計ジャッジ時間 | 2,394 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 12 WA * 1 |
コンパイルメッセージ
Main.rb:4: warning: mismatched indentations at 'rescue' with 'def' at 1 Syntax OK
ソースコード
def isInt?(str) Integer(str) return true rescue ArgumentError return false end 1.upto(2) do |i| str = STDIN.gets if !(str[0] != "0" && isInt?(str) && Integer(str) >= 0 && Integer(str) <= 12345) puts "NG" break end if i == 2 puts "OK" end end