結果
| 問題 |
No.454 逆2乗和
|
| コンテスト | |
| ユーザー |
くれちー
|
| 提出日時 | 2016-12-05 00:07:47 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 223 bytes |
| コンパイル時間 | 196 ms |
| コンパイル使用メモリ | 22,656 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-27 20:01:03 |
| 合計ジャッジ時間 | 5,820 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 31 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%lf", &x);
| ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <math.h>
int main() {
double x;
scanf("%lf", &x);
int n;
double ans = 0.0;
for (n = 1; n < 100000000; n++) {
ans += 1.0 / ((x + n) * (x + n));
}
printf("%.10lf\n", ans);
return 0;
}
くれちー