結果
| 問題 | No.560 ふしぎなナップサック |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-14 22:36:39 |
| 言語 | Rust (1.99.0 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 98µs | |
| コード長 | 260 bytes |
| 記録 | |
| コンパイル時間 | 634 ms |
| コンパイル使用メモリ | 173,312 KB |
| 実行使用メモリ | 9,792 KB |
| 最終ジャッジ日時 | 2026-10-14 22:36:42 |
| 合計ジャッジ時間 | 2,695 ms |
|
ジャッジサーバーID (参考情報) |
judge6_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
コンパイルメッセージ
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:9:14
|
9 | for i in (0..n){
| ^ ^
|
= note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default
help: remove these parentheses
|
9 - for i in (0..n){
9 + for i in 0..n {
|
warning: unused variable: `i`
--> src/main.rs:9:9
|
9 | for i in (0..n){
| ^ help: if this is intentional, prefix it with an underscore: `_i`
|
= note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
ソースコード
use proconio::input;
use std::collections::HashMap;
use std::collections::BTreeSet;
use std::ops::ControlFlow::Break;
fn main(){
input!{
mut m:f64,mut n:usize,
}
for i in (0..n){
m=(m*2.0)/3.0+(m+1.0)/3.0;
}
print!("{}",m)
}