結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー tanukidontanukidon
提出日時 2018-04-30 13:06:30
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 420 bytes
コンパイル時間 585 ms
コンパイル使用メモリ 11,452 KB
実行使用メモリ 15,380 KB
最終ジャッジ日時 2023-09-10 08:24:29
合計ジャッジ時間 3,017 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 78 ms
15,288 KB
testcase_02 AC 78 ms
15,040 KB
testcase_03 WA -
testcase_04 AC 78 ms
15,296 KB
testcase_05 AC 79 ms
15,336 KB
testcase_06 AC 79 ms
15,128 KB
testcase_07 AC 80 ms
15,140 KB
testcase_08 AC 80 ms
15,060 KB
testcase_09 AC 78 ms
15,228 KB
testcase_10 AC 78 ms
15,132 KB
testcase_11 AC 80 ms
15,316 KB
testcase_12 WA -
testcase_13 AC 80 ms
15,280 KB
testcase_14 AC 80 ms
15,288 KB
testcase_15 AC 80 ms
15,380 KB
testcase_16 AC 80 ms
15,312 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a = gets.chomp.split("")
b = gets.chomp.split("")
c = 0
if a[0] == "0"
  c = 1
else
  a.each_index do |i|
    until a[i] =~ /\d/
      c = 1
      break
    end
  end
end
if c == 1
elsif b[0] == "0"
  c = 1
else
  b.each_index do |i|
    until a[i] =~ /\d/
      c = 1
      break
    end
  end
end
if c == 0
  if a.join.to_i <= 12345 && b.join.to_i <= 12345
    puts "OK"
  else
    puts "NG"
  end
else
  puts "NG"
end
0