結果
問題 |
No.369 足し間違い
|
ユーザー |
![]() |
提出日時 | 2017-02-05 20:16:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 159 bytes |
コンパイル時間 | 1,387 ms |
コンパイル使用メモリ | 165,008 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-24 10:12:32 |
合計ジャッジ時間 | 1,862 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; int n,a,x; int main() { cin>>n;n++; while(n--) cin>>a;x+=(n>0?a:-a); cout<<x<<endl; return 0; }