結果
| 問題 | No.1663 Maximum Remainder |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-12 18:25:08 |
| 言語 | Rust (1.97.1 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 2 ms / 2,000 ms |
| + 682µs | |
| コード長 | 279 bytes |
| 記録 | |
| コンパイル時間 | 450 ms |
| コンパイル使用メモリ | 186,508 KB |
| 実行使用メモリ | 9,900 KB |
| 最終ジャッジ日時 | 2026-10-12 18:25:13 |
| 合計ジャッジ時間 | 2,058 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
コンパイルメッセージ
warning: unnecessary parentheses around `for` iterator expression
--> src/main.rs:8:14
|
8 | for i in (a..b+1){
| ^ ^
|
= note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default
help: remove these parentheses
|
8 - for i in (a..b+1){
8 + for i in a..b+1 {
|
warning: unnecessary parentheses around `for` iterator expression
--> src/main.rs:9:18
|
9 | for j in (c..d+1){
| ^ ^
|
help: remove these parentheses
|
9 - for j in (c..d+1){
9 + for j in c..d+1 {
|
ソースコード
use proconio::input;
fn main(){
input!{
a:usize,b:usize,c:usize,d:usize,m:usize,
}
let mut ans=0;
for i in (a..b+1){
for j in (c..d+1){
if ans<(i+j)%m{
ans=(i+j)%m;
}
}
}
print!("{}",ans);
}