結果
| 問題 |
No.293 4>7の世界
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-10-23 22:38:14 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 104 ms / 2,000 ms |
| コード長 | 334 bytes |
| コンパイル時間 | 1,561 ms |
| コンパイル使用メモリ | 7,168 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-12-30 11:13:25 |
| 合計ジャッジ時間 | 4,173 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
コンパイルメッセージ
Syntax OK
ソースコード
A,B=gets.split
As=A.size;Bs=B.size
if(As!=Bs) then puts [A.to_i, B.to_i].max; exit; end
(0...As).each{|i|
if A[i]!=B[i]
# puts "A[i]=#{A[i]} B[i]=#{B[i]}"
if (A[i] > B[i] || (A[i]=='4' && B[i]=='7')) && !(A[i]=='7' && B[i]=='4')
puts A; exit
else
puts B; exit
end
end
}