結果

問題 No.909 たぴの配置
コンテスト
ユーザー tamato
提出日時 2020-02-15 12:02:52
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 122 ms / 3,000 ms
コード長 404 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,160 ms
コンパイル使用メモリ 84,992 KB
実行使用メモリ 127,316 KB
最終ジャッジ日時 2026-04-22 15:36:27
合計ジャッジ時間 5,467 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def main():
    import sys
    input = sys.stdin.readline

    N = int(input())
    X = list(map(int, input().split()))
    Y = list(map(int, input().split()))

    D = [x+y for x, y in zip(X, Y)]
    d = min(D)
    print(d)
    print(0)
    for x, y in zip(X, Y):
        if x < y:
            print(x)
        else:
            print(max(d - y, 0))
    print(d)


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