結果
| 問題 | No.836 じょうよ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-14 22:31:28 |
| 言語 | Rust (1.99.0 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 188 ms / 1,000 ms |
| + 525µs | |
| コード長 | 331 bytes |
| 記録 | |
| コンパイル時間 | 521 ms |
| コンパイル使用メモリ | 175,816 KB |
| 実行使用メモリ | 9,848 KB |
| 最終ジャッジ日時 | 2026-10-14 22:31:44 |
| 合計ジャッジ時間 | 5,070 ms |
|
ジャッジサーバーID (参考情報) |
judge6_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 41 |
コンパイルメッセージ
warning: unused import: `std::collections::HashMap`
--> src/main.rs:2:5
|
2 | use std::collections::HashMap;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
warning: unused import: `std::collections::BTreeSet`
--> src/main.rs:3:5
|
3 | use std::collections::BTreeSet;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import: `std::ops::ControlFlow::Break`
--> src/main.rs:4:5
|
4 | use std::ops::ControlFlow::Break;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unnecessary parentheses around `for` iterator expression
--> src/main.rs:10:14
|
10 | for i in (l+(r-l+1)/n*n..r+1){
| ^ ^
|
= note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default
help: remove these parentheses
|
10 - for i in (l+(r-l+1)/n*n..r+1){
10 + for i in l+(r-l+1)/n*n..r+1 {
|
warning: unnecessary parentheses around `for` iterator expression
--> src/main.rs:13:14
|
13 | for i in (0..n){
| ^ ^
|
help: remove these parentheses
|
13 - for i in (0..n){
13 + for i in 0..n {
|
ソースコード
use proconio::input;
use std::collections::HashMap;
use std::collections::BTreeSet;
use std::ops::ControlFlow::Break;
fn main(){
input!{
l:usize,r:usize,n:usize,
}
let mut a=[(r-l+1)/n;100000];
for i in (l+(r-l+1)/n*n..r+1){
a[i%n]+=1;
}
for i in (0..n){
println!("{}",a[i]);
}
}