結果
問題 |
No.480 合計
|
ユーザー |
![]() |
提出日時 | 2017-06-10 15:31:26 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 124 bytes |
コンパイル時間 | 105 ms |
コンパイル使用メモリ | 22,400 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-14 09:27:20 |
合計ジャッジ時間 | 833 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 22 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d",&n); | ~~~~~^~~~~~~~~ main.cpp:8:18: warning: ‘a’ may be used uninitialized in this function [-Wmaybe-uninitialized] 8 | a+=i; | ~^~~
ソースコード
#include<stdio.h> int main() { int i,n,a; scanf("%d",&n); for(i=1;i<=n;i++){ a+=i; } printf("%d\n",a); return 0; }