結果
問題 |
No.480 合計
|
ユーザー |
|
提出日時 | 2019-10-13 15:47:18 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 345 bytes |
コンパイル時間 | 14,474 ms |
コンパイル使用メモリ | 377,844 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-15 22:21:00 |
合計ジャッジ時間 | 15,551 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
use std::io::{self, Read}; fn read_stdin<'a>() -> Vec<String> { let mut buffer = String::new(); io::stdin().read_to_string(&mut buffer).ok(); buffer.trim().split('\n').map(|s| s.to_string()).collect() } fn main() { let s = read_stdin().first().unwrap().parse::<i32>().unwrap(); println!("{:?}", (0..s + 1).sum::<i32>()); }