⌨️

[AtCoder]ABC-275|B - ABC-DEF

2023/07/31に公開

設問ページ

提出結果

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


def m3(x, y, z, a):
    return (x % a) * (y % a) * (z % a)


def main():
    a, b, c, d, e, f = getIntMap()
    div = 998244353

    print((m3(a, b, c, div) - m3(d, e, f, div)) % div)


if __name__ == "__main__":
    main()

Discussion