結果
| 問題 |
No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
|
| ユーザー |
pracode
|
| 提出日時 | 2018-09-14 18:46:55 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 356 bytes |
| コンパイル時間 | 1,239 ms |
| コンパイル使用メモリ | 29,184 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-05 22:20:31 |
| 合計ジャッジ時間 | 4,145 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / 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