結果

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

ソースコード

diff #

#include <stdio.h>

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