結果

問題 No.453 製薬会社
ユーザー sette-pianisette-piani
提出日時 2017-01-23 21:06:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 540 bytes
コンパイル時間 133 ms
コンパイル使用メモリ 10,768 KB
実行使用メモリ 7,988 KB
最終ジャッジ日時 2023-08-24 21:37:09
合計ジャッジ時間 1,194 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,852 KB
testcase_01 AC 15 ms
7,956 KB
testcase_02 AC 15 ms
7,896 KB
testcase_03 AC 15 ms
7,812 KB
testcase_04 AC 15 ms
7,988 KB
testcase_05 AC 15 ms
7,900 KB
testcase_06 AC 15 ms
7,808 KB
testcase_07 AC 16 ms
7,812 KB
testcase_08 AC 15 ms
7,792 KB
testcase_09 AC 14 ms
7,864 KB
testcase_10 AC 15 ms
7,808 KB
testcase_11 AC 15 ms
7,816 KB
testcase_12 AC 15 ms
7,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    c, d = input().split()
    c = float(c)
    d = float(d)
    b = (21*d - 7*c)/13
    a = (28 * d - 20 * b)/7
    if 0 <= a and 0 <= b:
        print(1000*a+2000*b)
    elif a < 0:
        print(7000*c)
    else:
        print(4000*d)





if __name__ == "__main__":
    import sys
    import os
    if len(sys.argv) > 1:
        if sys.argv[1] == "-d":
            filename = "input1.txt"
            fd = os.open(filename, os.O_RDONLY)
            os.dup2(fd, sys.stdin.fileno())
            main()
    else:
        main()
0