結果
問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
ユーザー |
![]() |
提出日時 | 2016-12-11 16:25:54 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 78 ms / 2,000 ms |
コード長 | 523 bytes |
コンパイル時間 | 53 ms |
コンパイル使用メモリ | 7,680 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-11-29 03:33:49 |
合計ジャッジ時間 | 1,959 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
コンパイルメッセージ
Syntax OK
ソースコード
a = gets.chomp b = gets.chomp def check_has_str(str) str.each_char do |c| if c !~ /\d+/ puts 'NG' exit end end end def check_zero_digit(str) if str.length < 2 return end str.each_char do |c| if c == '0' puts 'NG' exit else return end end end def check_over_12345(int) if int > 12345 puts 'NG' exit end end check_has_str(a) check_has_str(b) check_zero_digit(a) check_zero_digit(b) check_over_12345(a.to_i) check_over_12345(b.to_i) puts 'OK'