結果

問題 No.450 ベー君のシャトルラン
ユーザー kichirb3
提出日時 2018-03-25 18:10:39
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 521 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2024-06-25 06:06:43
合計ジャッジ時間 1,905 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
"""
No.450 ベー君のシャトルラン
https://yukicoder.me/problems/no/450

"""
import sys
from sys import stdin
from decimal import *
input = stdin.readline


def solve(v1, v2, d, w):
    getcontext().prec = 15
    ans = Decimal(d) / (Decimal(v1) + Decimal(v2)) * Decimal(w)
    return ans


def main(args):
    v1, v2 = map(float, input().split())
    d = float(input())
    w = float(input())
    ans = solve(v1, v2, d, w)
    print(ans)


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