結果
| 問題 | No.8072 Sum of sqrt(x) |
| ユーザー |
|
| 提出日時 | 2020-09-26 13:26:25 |
| 言語 | C++17(gcc12) (gcc 12.4.0 + boost 1.90.0) |
| 結果 |
OLE
|
| 実行時間 | - |
| コード長 | 227 bytes |
| 記録 | |
| コンパイル時間 | 2,593 ms |
| コンパイル使用メモリ | 198,492 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-14 02:08:04 |
| 合計ジャッジ時間 | 24,327 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 OLE * 22 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
scanf("%d", &n);
long double ans = 0;
while (n--) {
long double x;
cin >> x;
ans += sqrt(x);
printf("%.17Lf\n", ans);
}
return 0;
}