結果

問題 No.293 4>7の世界
ユーザー simansiman
提出日時 2015-11-03 00:41:38
言語 Ruby
(3.3.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 375 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 11,348 KB
実行使用メモリ 15,372 KB
最終ジャッジ日時 2023-08-28 21:53:56
合計ジャッジ時間 3,281 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,048 KB
testcase_01 AC 82 ms
15,352 KB
testcase_02 AC 84 ms
15,372 KB
testcase_03 AC 84 ms
15,180 KB
testcase_04 WA -
testcase_05 AC 82 ms
15,228 KB
testcase_06 AC 82 ms
15,160 KB
testcase_07 WA -
testcase_08 AC 85 ms
15,088 KB
testcase_09 AC 82 ms
15,144 KB
testcase_10 AC 82 ms
15,168 KB
testcase_11 AC 83 ms
15,156 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 82 ms
15,280 KB
testcase_16 AC 82 ms
15,328 KB
testcase_17 AC 82 ms
15,272 KB
testcase_18 AC 82 ms
15,120 KB
testcase_19 AC 82 ms
15,136 KB
testcase_20 AC 82 ms
15,236 KB
testcase_21 AC 84 ms
15,136 KB
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a,b=gets.split.map(&:to_i)
aa=("%010d"%a).chars.map(&:to_i)
bb=("%010d"%b).chars.map(&:to_i)

class Fixnum
  def <(value)
    if self == 4 && value == 7
      return false
    elsif self == 7 && value == 4
      return true
    else
      super(value)
    end
  end
end

0.upto(9){|i|
  if aa[i] < bb[i]
    puts b
    break
  elsif bb[i] < aa[i]
    puts a
    break
  end
}
0