結果
| 問題 | No.480 合計 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-06 13:31:29 |
| 言語 | Rust (1.99.0 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 0 ms / 2,000 ms |
| + 904µs | |
| コード長 | 546 bytes |
| 記録 | |
| コンパイル時間 | 12,020 ms |
| コンパイル使用メモリ | 189,688 KB |
| 実行使用メモリ | 9,840 KB |
| 最終ジャッジ日時 | 2026-10-06 13:07:15 |
| 合計ジャッジ時間 | 7,959 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
use std::io::{self, BufRead, BufReader, BufWriter, Write};
fn main() {
let stdin = io::stdin();
let mut stdin = BufReader::new(stdin.lock());
let stdout = io::stdout();
let mut stdout = BufWriter::new(stdout.lock());
run(&mut stdin, &mut stdout);
}
fn run<R, W>(input: &mut R, output: &mut W)
where
R: BufRead,
W: Write,
{
let mut n = String::new();
input.read_line(&mut n).unwrap();
let n: u32 = n.trim().parse().unwrap();
let sum: u32 = (1..=n).sum();
writeln!(output, "{}", sum).unwrap();
}