結果
問題 |
No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
|
ユーザー |
|
提出日時 | 2022-08-28 21:58:55 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 48 ms / 2,000 ms |
コード長 | 310 bytes |
コンパイル時間 | 237 ms |
コンパイル使用メモリ | 28,928 KB |
実行使用メモリ | 5,760 KB |
最終ジャッジ日時 | 2024-10-15 18:57:15 |
合計ジャッジ時間 | 2,032 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 15 |
ソースコード
#include<stdio.h> #include<stdlib.h> int main(void) { int n; scanf("%d",&n); long long int *a=calloc(n,sizeof(long int)); for(int i=0; i<n; i++) scanf("%lld",&a[i]); long long int ans=0; for(int i=0; i<n; i++) ans+=a[i]; printf("%lld\n",ans); return 0; }