結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー torus711torus711
提出日時 2016-11-18 22:45:14
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 185 bytes
コンパイル時間 33 ms
コンパイル使用メモリ 11,520 KB
実行使用メモリ 15,332 KB
最終ジャッジ日時 2023-08-17 11:15:28
合計ジャッジ時間 2,166 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
15,112 KB
testcase_01 AC 80 ms
15,064 KB
testcase_02 AC 76 ms
15,132 KB
testcase_03 WA -
testcase_04 AC 74 ms
15,160 KB
testcase_05 AC 74 ms
15,332 KB
testcase_06 AC 74 ms
15,072 KB
testcase_07 AC 75 ms
15,140 KB
testcase_08 AC 74 ms
15,148 KB
testcase_09 AC 74 ms
15,076 KB
testcase_10 AC 76 ms
15,324 KB
testcase_11 AC 75 ms
15,224 KB
testcase_12 WA -
testcase_13 AC 75 ms
15,172 KB
testcase_14 AC 74 ms
15,112 KB
testcase_15 AC 74 ms
15,164 KB
testcase_16 AC 75 ms
15,124 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def valid( s )
	if s !~ /^[1-9][0-9]*$/
		return false
	end
	n = s.to_i
	return 0 <= n && n <= 12345
end

a = gets.strip
b = gets.strip

puts ( valid( a ) && valid( b ) ? "OK" : "NG" )
0