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