結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー iodo_shiba
提出日時 2018-08-08 03:44:34
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 401 bytes
コンパイル時間 617 ms
コンパイル使用メモリ 58,848 KB
実行使用メモリ 13,884 KB
最終ジャッジ日時 2024-09-19 19:08:16
合計ジャッジ時間 8,061 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 3
other WA * 5 TLE * 2 -- * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<sstream>
#include<string>

int main(){
    std::string line;
    getline(std::cin,line);
    std::istringstream iss(line);
    int N;
    iss >> N;
    getline(std::cin,line);
    long int sum=0;
    for(int i=0;i<N;i++){
        std::istringstream irdiss(line);
        long int A;
        irdiss>>A;
        sum+=A;
    }
    std::cout << sum <<std::endl;
    return 0;
}
0