結果
| 問題 | No.480 合計 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-04 16:28:24 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 184 bytes |
| 記録 | |
| コンパイル時間 | 156 ms |
| コンパイル使用メモリ | 29,380 KB |
| 最終ジャッジ日時 | 2026-02-24 01:03:57 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:14:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
14 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int total(int a)
{
int i;
int total = 0;
for(i=1;i<=a;i++){
total+=i;
}
return total;
}
int main(void){
int n;
scanf("%d",&n);
printf("%d\n",total(n));
}