結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー torus711torus711
提出日時 2016-11-18 22:45:42
言語 Ruby
(3.3.0)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 197 bytes
コンパイル時間 401 ms
コンパイル使用メモリ 11,424 KB
実行使用メモリ 15,344 KB
最終ジャッジ日時 2023-08-17 11:15:48
合計ジャッジ時間 2,586 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,176 KB
testcase_01 AC 79 ms
15,248 KB
testcase_02 AC 79 ms
15,328 KB
testcase_03 AC 81 ms
15,344 KB
testcase_04 AC 79 ms
15,336 KB
testcase_05 AC 81 ms
15,264 KB
testcase_06 AC 80 ms
15,264 KB
testcase_07 AC 82 ms
15,148 KB
testcase_08 AC 79 ms
15,064 KB
testcase_09 AC 79 ms
15,100 KB
testcase_10 AC 80 ms
15,240 KB
testcase_11 AC 79 ms
15,052 KB
testcase_12 AC 78 ms
15,176 KB
testcase_13 AC 77 ms
15,292 KB
testcase_14 AC 78 ms
15,168 KB
testcase_15 AC 79 ms
15,332 KB
testcase_16 AC 78 ms
15,172 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def valid( s )
	if s !~ /^[1-9][0-9]*$/ && s != "0"
		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