結果

問題 No.3060 サンプルケース至上主義
ユーザー akakimidoriakakimidori
提出日時 2020-04-01 21:25:19
言語 Rust
(1.77.0)
結果
WA  
実行時間 -
コード長 348 bytes
コンパイル時間 2,510 ms
コンパイル使用メモリ 133,912 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-09 15:14:26
合計ジャッジ時間 2,174 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused import: `std::io::Write`
 --> Main.rs:2:5
  |
2 | use std::io::Write;
  |     ^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused variable: `out`
 --> Main.rs:6:13
  |
6 |     let mut out = std::io::BufWriter::new(out.lock());
  |             ^^^ help: if this is intentional, prefix it with an underscore: `_out`
  |
  = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `it`
  --> Main.rs:10:13
   |
10 |     let mut it = s.trim().split_whitespace();
   |             ^^ help: if this is intentional, prefix it with an underscore: `_it`

warning: variable does not need to be mutable
 --> Main.rs:6:9
  |
6 |     let mut out = std::io::BufWriter::new(out.lock());
  |         ----^^^
  |         |
  |         help: remove this `mut`
  |
  = note: `#[warn(unused_mut)]` on by default

warning: variable does not need to be mutable
  --> Main.rs:10:9
   |
10 |     let mut it = s.trim().split_whitespace();
   |         ----^^
   |         |
   |         help: remove this `mut`

warning: 5 warnings emitted

ソースコード

diff #

use std::io::Read;
use std::io::Write;

fn run() {
    let out = std::io::stdout();
    let mut out = std::io::BufWriter::new(out.lock());
    let mut s = String::new();
    std::io::stdin().read_to_string(&mut s).unwrap();
//    std::io::stdin().read_line(&mut s).unwrap();
    let mut it = s.trim().split_whitespace();
}

fn main() {
    run();
}
0