結果
| 問題 |
No.480 合計
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-04 16:28:24 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 184 bytes |
| コンパイル時間 | 1,001 ms |
| コンパイル使用メモリ | 20,352 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-27 18:47:14 |
| 合計ジャッジ時間 | 1,550 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / 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));
}