結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー 🇳🇱🦭🇯🇵
提出日時 2024-09-04 09:47:35
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 9 ms / 2,000 ms
コード長 495 bytes
コンパイル時間 12,379 ms
コンパイル使用メモリ 404,976 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-04 09:47:50
合計ジャッジ時間 14,566 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::io;
use std::io::prelude::*;

fn main() {
    let stdin = io::read_to_string(io::stdin()).unwrap();
    let mut stdin = stdin.split_whitespace();
    let stdout = io::stdout();
    let mut stdout = io::BufWriter::new(stdout.lock());

    let n: usize = stdin.next().unwrap().parse::<usize>().unwrap();
    let mut sn = 0;
    for _ in 0..n {
        let a: usize = stdin.next().unwrap().parse::<usize>().unwrap();
        sn += a;
    }
    writeln!(stdout, "{}", sn).unwrap_or(());

}
0