結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
mesh1nek0x0
|
| 提出日時 | 2018-07-09 23:30:48 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 95 ms / 5,000 ms |
| コード長 | 358 bytes |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-07-18 00:36:37 |
| 合計ジャッジ時間 | 4,738 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
コンパイルメッセージ
Syntax OK
ソースコード
#!/bin/ruby
input = gets.chomp.split('.')
oldA = input[0].to_i
oldB = input[1].to_i
oldC = input[2].to_i
input = gets.chomp.split('.')
currentA = input[0].to_i
currentB = input[1].to_i
currentC = input[2].to_i
old = oldA * 10201 + oldB * 101 + oldC
current = currentA * 10201 + currentB * 101 + currentC
if current <= old
puts 'YES'
else
puts 'NO'
end
mesh1nek0x0