結果
| 問題 | No.1663 Maximum Remainder |
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2022-12-27 20:43:17 |
| 言語 | Ruby (4.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 123 bytes |
| 記録 | |
| コンパイル時間 | 208 ms |
| コンパイル使用メモリ | 9,216 KB |
| 実行使用メモリ | 15,104 KB |
| 最終ジャッジ日時 | 2026-05-16 10:12:27 |
| 合計ジャッジ時間 | 2,125 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 WA * 5 |
コンパイルメッセージ
Syntax OK
ソースコード
a,b,c,d,m=gets.split(" ").map{|e| e.to_i}
ans=0
a.upto(b){|n1|
c.upto(d){|n2|
d=(n1+n2)%m
ans=d if ans<d
}
}
puts ans
horiesiniti