結果

問題 No.369 足し間違い
ユーザー focus
提出日時 2018-01-17 19:09:06
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 250 bytes
コンパイル時間 508 ms
コンパイル使用メモリ 58,456 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 06:50:23
合計ジャッジ時間 1,000 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:12: warning: ‘N’ is used uninitialized [-Wuninitialized]
    9 |     while(N--){
      |           ~^~

ソースコード

diff #

#include<iostream>
#include<vector>
#include<string>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
    int x,y,N,sum=0;
    while(N--){
        cin >> x;
        sum += x;
    }
    cin >> y;
    cout << sum-y;
    return 0;
}
0