結果

問題 No.293 4>7の世界
ユーザー zeroyonichihachizeroyonichihachi
提出日時 2016-10-13 14:46:51
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 247 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-05-01 21:09:29
合計ジャッジ時間 2,655 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
12,160 KB
testcase_01 AC 78 ms
12,416 KB
testcase_02 AC 76 ms
12,288 KB
testcase_03 WA -
testcase_04 AC 76 ms
12,160 KB
testcase_05 WA -
testcase_06 AC 75 ms
12,160 KB
testcase_07 AC 75 ms
12,288 KB
testcase_08 AC 76 ms
12,288 KB
testcase_09 WA -
testcase_10 AC 76 ms
12,288 KB
testcase_11 AC 73 ms
12,288 KB
testcase_12 AC 75 ms
12,160 KB
testcase_13 AC 79 ms
12,288 KB
testcase_14 AC 80 ms
12,160 KB
testcase_15 WA -
testcase_16 AC 80 ms
12,160 KB
testcase_17 AC 73 ms
12,288 KB
testcase_18 AC 76 ms
12,416 KB
testcase_19 AC 77 ms
12,288 KB
testcase_20 AC 76 ms
12,288 KB
testcase_21 AC 77 ms
12,288 KB
testcase_22 AC 80 ms
12,160 KB
testcase_23 AC 78 ms
12,160 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def sw(n)
  n.to_s.chars.map{|c|
    case c
    when "4" then "7"
    when "7" then "4"
    else c
    end
  }.join.to_i
end

def main(a, b)
  p sw(a) < sw(b) ? b : a
end


if __FILE__ == $0
  main(*gets.split(" ").map(&:to_i))
  # main(4, 7)
end
0