⌨️

[AtCoder]ABC-265|A - Apple

2023/07/13に公開

設問ページ

提出結果

def getIntMap():
    return map(int, input().split())


def main():
    x, y, n = getIntMap()

    if y < x * 3:
        s = n // 3 * y + n % 3 * x
    else:
        s = n * x

    print(s)


if __name__ == "__main__":
    main()

Discussion