結果
| 問題 |
No.480 合計
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-05 20:45:36 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 192 bytes |
| コンパイル時間 | 12,040 ms |
| コンパイル使用メモリ | 378,760 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-18 13:43:00 |
| 合計ジャッジ時間 | 13,011 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 19 |
コンパイルメッセージ
warning: unused `Result` that must be used --> src/main.rs:5:5 | 5 | io::stdin().read_to_string(&mut n); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this `Result` may be an `Err` variant, which should be handled = note: `#[warn(unused_must_use)]` on by default help: use `let _ = ...` to ignore the resulting value | 5 | let _ = io::stdin().read_to_string(&mut n); | +++++++
ソースコード
use std::io::{self, Read};
fn main() {
let mut n = String::new();
io::stdin().read_to_string(&mut n);
let n: u8 = n.trim().parse().unwrap();
println!("{}", n * (n + 1) / 2);
}