結果

問題 No.538 N.G.S.
ユーザー Theta
提出日時 2022-10-24 18:50:54
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 263 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2024-07-02 21:57:24
合計ジャッジ時間 3,765 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 43 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import Decimal


def main():
    b = list(map(Decimal, input().split()))
    if b[0] == b[1]:
        print(b[0])
        return
    r = ((b[2]-b[1])/(b[1]-b[0]))
    d = b[1] - r*b[0]
    print(int(r*b[2]+d))


if __name__ == "__main__":
    main()
0