結果

問題 No.480 合計
ユーザー Haijinn
提出日時 2017-02-14 21:38:47
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 150 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 20,352 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-14 09:15:41
合計ジャッジ時間 883 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 | scanf("%d",&n);
      | ^~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void){
int d=0;
int a;
int r=0;
int i;
int n;
scanf("%d",&n);
for(i=1;i<=n;i++){
	d+=i;
}

printf("%d\n",d);

return 0;
}
0