結果

問題 No.293 4>7の世界
ユーザー dagunikodaguniko
提出日時 2015-10-23 22:44:19
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 409 bytes
コンパイル時間 64 ms
コンパイル使用メモリ 11,312 KB
実行使用メモリ 15,268 KB
最終ジャッジ日時 2023-09-30 07:24:34
合計ジャッジ時間 3,190 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 86 ms
15,152 KB
testcase_02 AC 82 ms
15,108 KB
testcase_03 WA -
testcase_04 AC 82 ms
15,268 KB
testcase_05 AC 85 ms
15,064 KB
testcase_06 AC 82 ms
15,228 KB
testcase_07 WA -
testcase_08 AC 83 ms
15,212 KB
testcase_09 AC 84 ms
15,116 KB
testcase_10 AC 83 ms
15,152 KB
testcase_11 AC 84 ms
15,012 KB
testcase_12 AC 83 ms
15,204 KB
testcase_13 AC 83 ms
15,160 KB
testcase_14 AC 83 ms
15,172 KB
testcase_15 AC 83 ms
15,208 KB
testcase_16 AC 83 ms
15,112 KB
testcase_17 AC 84 ms
15,136 KB
testcase_18 AC 85 ms
15,252 KB
testcase_19 AC 83 ms
15,224 KB
testcase_20 AC 82 ms
15,064 KB
testcase_21 AC 83 ms
15,100 KB
testcase_22 AC 83 ms
15,172 KB
testcase_23 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

A,B = gets.chomp.split(" ")

if A.to_s.include?("4") and B.to_s.include?("7")
  A_a = A.to_s.gsub("4","8")
  if A_a.to_i < B.to_i
    puts B
  elsif A_a.to_i > B.to_i
    puts A
  end
elsif B.to_s.include?("4") and A.to_s.include?("7")
  B_a = B.to_s.gsub(/4/,"8")
  if A.to_i < B_a.to_i
    puts B
  elsif  A.to_i > B_a.to_i
    puts A
  end
else
  if A < B
    puts B
  elsif A > B
    puts A
  end
end




0