結果
問題 |
No.480 合計
|
ユーザー |
|
提出日時 | 2019-05-17 12:59:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 230 bytes |
コンパイル時間 | 506 ms |
コンパイル使用メモリ | 59,100 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-17 05:53:03 |
合計ジャッジ時間 | 1,301 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 22 |
コンパイルメッセージ
main.cpp:8:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] 8 | main() | ^~~~ main.cpp: In function ‘int main()’: main.cpp:17:13: warning: ‘sum’ may be used uninitialized in this function [-Wmaybe-uninitialized] 17 | cout << sum << endl; | ^~~
ソースコード
#include <iostream> #include <string> #include <cmath> using namespace std; // namespace std main() { int N; cin >> N; int sum; for (int i = 1; i < N; i++) { sum += i; } cout << sum << endl; }