結果
| 問題 |
No.480 合計
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-21 21:29:27 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 287 bytes |
| コンパイル時間 | 444 ms |
| コンパイル使用メモリ | 20,096 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 15:05:59 |
| 合計ジャッジ時間 | 1,291 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 22 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:11:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%d", &n);
| ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
//#include <stdlib.h>
int main(int argc, char *argv[])
{
//int n = atoi(argv[1]);
int n = 0;
int i;
int result = 0;
scanf("%d", &n);
// printf("%d\n", n);
for(i = 0; i < n; i++)
result += (i + 1);
printf("result:%d\n", result);
return(0);
}