結果
| 問題 |
No.454 逆2乗和
|
| コンテスト | |
| ユーザー |
くれちー
|
| 提出日時 | 2016-12-05 00:06:30 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 220 bytes |
| コンパイル時間 | 222 ms |
| コンパイル使用メモリ | 23,296 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-27 20:00:41 |
| 合計ジャッジ時間 | 49,343 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 16 WA * 15 |
コンパイルメッセージ
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 < 1000000000; n++) {
ans += 1.0 / pow(x + n, 2.0);
}
printf("%.10lf\n", ans);
return 0;
}
くれちー