⌨️

[AtCoder]ABC-346|A - Adjacent Product

2024/04/05に公開

設問ページ

提出結果

def getInt():
    return int(input())


def getIntList():
    return list(map(int, input().split()))


def main():
    n = getInt()
    a = getIntList()
    b = []

    for i in range(1, n):
        b.append(a[i - 1] * a[i])

    print(" ".join(map(str, b)))


if __name__ == "__main__":
    main()

Discussion