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