結果
問題 |
No.948 Bomb vs Dush
|
ユーザー |
|
提出日時 | 2019-12-08 16:39:24 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 432 bytes |
コンパイル時間 | 279 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-30 18:16:14 |
合計ジャッジ時間 | 3,151 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 RE * 1 |
other | WA * 11 RE * 27 |
ソースコード
import math r =float(input()) R =float(input()) #余弦定理でcosを求める c = (R*R+R*R-4*r*r)/2*R*R #時間t'を求める t = 2*math.pi-math.acos(c) #弧度法に直す theta = t*180/math.pi #半径R+rの円とR-rの円の差分を求め、角度から比率を計算し面積を求める。 area = math.pi*((R+r)*(R+r)-(R-r)*(R-r))*theta/360. #また半径rの円の面積も足す。 area += math.pi*r*r print(t) print(area)