結果
| 問題 |
No.293 4>7の世界
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-10-13 14:45:26 |
| 言語 | Ruby (3.4.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 246 bytes |
| コンパイル時間 | 54 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-11-22 03:41:12 |
| 合計ジャッジ時間 | 3,002 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 4 |
| other | RE * 20 |
コンパイルメッセージ
Syntax OK
ソースコード
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