結果
問題 |
No.456 Millions of Submits!
|
ユーザー |
![]() |
提出日時 | 2016-12-08 00:31:35 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 3,062 ms / 4,500 ms |
コード長 | 484 bytes |
コンパイル時間 | 235 ms |
コンパイル使用メモリ | 24,064 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 03:12:18 |
合計ジャッジ時間 | 10,598 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
コンパイルメッセージ
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", &m); | ^~~~~~~~~~~~~~~~ main.c:12:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 12 | scanf("%lf %lf %lf", &a, &b, &t); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <math.h> int main() { double m; scanf("%lf", &m); double a, b, t, ans; int i; for (i = 0; i < m; i++) { scanf("%lf %lf %lf", &a, &b, &t); if (b == 0) ans = pow(t, 1.0 / a); else { double n = 1.0; double tmp1 = pow(t, 1.0 / b); while (1) { double tmp3 = n - exp(tmp1 / pow(n, a / b)); if (fabs(tmp3) <= 10e-10) { ans = n; break; } else n -= tmp3 / 4.0; } } printf("%.10lf\n", ans); } return 0; }