結果
| 問題 |
No.480 合計
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-06-05 14:09:32 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 144 bytes |
| コンパイル時間 | 237 ms |
| コンパイル使用メモリ | 22,272 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-21 19:40:34 |
| 合計ジャッジ時間 | 1,107 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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:3:13: warning: ‘ans’ may be used uninitialized [-Wmaybe-uninitialized]
3 | int i,k,ans;
| ^~~
ソースコード
#include<stdio.h>
int main(){
int i,k,ans;
scanf("%d",&i);
for(k=1;k<=i;k++)
ans += i;
printf("%d",ans);
return 0;
}