結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー kutsutamakutsutama
提出日時 2019-01-16 18:16:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 318 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 10,592 KB
実行使用メモリ 8,004 KB
最終ジャッジ日時 2023-09-10 21:41:37
合計ジャッジ時間 33,136 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4,897 ms
7,868 KB
testcase_01 AC 4,859 ms
7,868 KB
testcase_02 AC 4,795 ms
7,924 KB
testcase_03 AC 4,787 ms
7,940 KB
testcase_04 AC 4,957 ms
7,920 KB
testcase_05 AC 4,645 ms
7,916 KB
testcase_06 TLE -
testcase_07 TLE -
testcase_08 AC 4,865 ms
8,004 KB
testcase_09 TLE -
testcase_10 AC 4,999 ms
7,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

c = int(input())
rin, rout = [int(x) for x in input().split()]

r0 = (rout - rin) / 2
v = 0
div = (rout - rin) / 10**7
r02 = r0**2
rr0 = rin + r0
r = rin
for i in range(0, 10**7):
    r = i * div + rin
    x = rr0 - r
    v += r * math.sqrt(r02 - x * x)
v *= 2 * 2 * math.pi * div
res = v * c

print(res)
0