結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー magmag
提出日時 2020-02-24 00:03:47
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 978 bytes
コンパイル時間 1,503 ms
コンパイル使用メモリ 164,336 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-19 07:54:31
合計ジャッジ時間 2,779 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 27 ms
5,376 KB
testcase_10 AC 61 ms
5,376 KB
testcase_11 AC 63 ms
5,376 KB
testcase_12 AC 64 ms
5,376 KB
testcase_13 AC 67 ms
5,376 KB
testcase_14 AC 69 ms
5,376 KB
testcase_15 AC 69 ms
5,376 KB
testcase_16 AC 75 ms
5,376 KB
testcase_17 AC 1 ms
5,376 KB
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>

using namespace std;

#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define All(s) s.begin(),s.end()
#define rAll(s) s.rbegin(),s.rend()
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep2(i, a, n) for(int i = (a); i < (n); i++)
#define repr(i, n) for(int i = (n); i >= 0; i--)
#define repr2(i, a, n) for(int i = (n); i >= (a); i--)

template<typename T,typename U>
void Inparray(T &f,U n){
  for(int i=0;i<n;i++) cin>>f[i];
}

template<typename T,typename U>
void Printarray(T f,U n){
  for(int i=0;i<n;i++) i!=n ? cout<<f[i]<<" " : cout<<f[i];
}

void flagfunc(bool flag,string A,string B){
  flag ? cout<<A<<endl : cout<<B<<endl;
}

void flag2func(bool flag){
  flag ? cout<<"Yes"<<endl : cout<<"No"<<endl;
}

void flag3func(bool flag){
  flag ? cout<<"YES"<<endl : cout<<"NO"<<endl;
}

int main(){
  int a,n;cin>>n;
  long long sum=0;
  rep(i,n){
    cin>>a;sum+=a;
  }
  cout<<sum<<endl;
}
0