結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー toco8
提出日時 2020-06-30 00:22:54
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 222 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 28,032 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-19 06:09:42
合計ジャッジ時間 1,338 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 9 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main(void)
{
  int total;
  double num, ans = 0;
  
  scanf("%d", &total);
  do {
    scanf("%lf", &num);
    ans += num;
    total--;
  } while (total > 0);
  printf("%.0lf\n", ans);
  return 0;
}
0