結果
| 問題 | No.369 足し間違い |
| コンテスト | |
| ユーザー |
focus
|
| 提出日時 | 2018-01-17 19:08:26 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 248 bytes |
| 記録 | |
| コンパイル時間 | 326 ms |
| コンパイル使用メモリ | 74,604 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-30 03:39:06 |
| 合計ジャッジ時間 | 995 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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--){
| ~^~
main.cpp:8:13: note: 'N' was declared here
8 | int x,y,N,sum=0;
| ^
ソースコード
#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 << x-y;
return 0;
}
focus