結果

問題 No.138 化石のバージョン
コンテスト
ユーザー mesh1nek0x0
提出日時 2018-07-09 23:22:13
言語 Ruby
(4.0.2)
コンパイル:
ruby -w -c _filename_
実行:
ruby _filename_
結果
WA  
実行時間 -
コード長 347 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 166 ms
コンパイル使用メモリ 9,088 KB
実行使用メモリ 29,696 KB
最終ジャッジ日時 2026-04-01 15:41:40
合計ジャッジ時間 3,749 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27 WA * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #
raw source code

#!/bin/ruby

input = gets.chomp(' ')
oldA = input[0].to_i
oldB = input[1].to_i
oldC = input[2].to_i

input = gets.chomp(' ')
currentA = input[0].to_i
currentB = input[1].to_i
currentC = input[2].to_i

old = oldA * 10101 + oldB * 101 + oldC
current = currentA * 10101 + currentB * 101 + currentC

if current <= old
  puts 'YES'
else
  puts 'NO'
end
0