結果
| 問題 |
No.480 合計
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-23 21:01:12 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 192 bytes |
| コンパイル時間 | 11,108 ms |
| コンパイル使用メモリ | 402,012 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-19 04:33:02 |
| 合計ジャッジ時間 | 12,057 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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);
}