結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー kichirb3kichirb3
提出日時 2018-03-06 00:11:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 30 ms / 5,000 ms
コード長 600 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-04-15 19:49:17
合計ジャッジ時間 829 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,880 KB
testcase_01 AC 30 ms
10,880 KB
testcase_02 AC 29 ms
10,880 KB
testcase_03 AC 29 ms
11,008 KB
testcase_04 AC 29 ms
10,752 KB
testcase_05 AC 28 ms
10,880 KB
testcase_06 AC 28 ms
10,880 KB
testcase_07 AC 28 ms
10,880 KB
testcase_08 AC 26 ms
10,880 KB
testcase_09 AC 27 ms
11,008 KB
testcase_10 AC 27 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
"""
No.89 どんどんドーナツどーんといこう!
https://yukicoder.me/problems/no/89

"""
import sys
from sys import stdin
from math import pi
input = stdin.readline


def main(args):
    """
    https://ja.wikipedia.org/wiki/トーラス
    体積 V = 2 * pi**2 * r**2 * R
    外側の円の半径: R + r
    内側の円の半径: R - r
    """
    C = int(input())
    Rin, Rout = map(int, input().split())
    R = (Rin + Rout) / 2
    r = Rout - R
    V = 2 * pi**2 * r**2 * R
    ans = V * C
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])
0