結果
| 問題 | No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用) |
| ユーザー |
pracode
|
| 提出日時 | 2018-09-14 18:46:55 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 356 bytes |
| 記録 | |
| コンパイル時間 | 159 ms |
| コンパイル使用メモリ | 38,080 KB |
| 最終ジャッジ日時 | 2026-02-22 01:46:20 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 4 |
| other | RE * 15 |
ソースコード
#include <stdio.h>
#include <stdlib.h>
int main()
{
int *heap;
int n;
double sum=0;
int i;
scanf("%d",&n);
heap=(int*)malloc(sizeof(double)*n);
if(heap=NULL)exit(0);
for(i=0;i<=n-1;i++){
scanf("%f",&heap[i]);
sum+=heap[i];
}
printf("%f",sum);
free(heap);
return 0;
}
pracode