結果
問題 | No.369 足し間違い |
ユーザー | umaumax |
提出日時 | 2017-05-01 21:28:30 |
言語 | C++11 (gcc 13.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 281 bytes |
コンパイル時間 | 699 ms |
コンパイル使用メモリ | 59,324 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-14 02:11:17 |
合計ジャッジ時間 | 1,021 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 5 |
コンパイルメッセージ
main.cpp: In function ‘int main(int, const char**)’: main.cpp:17:23: warning: ‘sum’ may be used uninitialized in this function [-Wmaybe-uninitialized] 17 | cout << sum - v << endl; | ^
ソースコード
#include <iostream> #include <vector> using namespace std; int main(int argc, const char* argv[]) { int N; cin >> N; long long int sum; for (auto&& a : vector<long long int>(N)) { cin >> a; sum += a; } long long int v; cin >> v; cout << sum - v << endl; return 0; }