結果

問題 No.909 たぴの配置
ユーザー nasutarou1341nasutarou1341
提出日時 2019-10-18 21:32:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 351 ms / 3,000 ms
コード長 291 bytes
コンパイル時間 249 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 40,124 KB
最終ジャッジ日時 2023-09-07 21:24:17
合計ジャッジ時間 6,374 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,836 KB
testcase_01 AC 15 ms
7,824 KB
testcase_02 AC 15 ms
7,932 KB
testcase_03 AC 15 ms
7,812 KB
testcase_04 AC 15 ms
7,808 KB
testcase_05 AC 339 ms
38,024 KB
testcase_06 AC 338 ms
39,012 KB
testcase_07 AC 314 ms
36,696 KB
testcase_08 AC 349 ms
38,004 KB
testcase_09 AC 350 ms
40,124 KB
testcase_10 AC 318 ms
36,652 KB
testcase_11 AC 330 ms
36,440 KB
testcase_12 AC 344 ms
38,028 KB
testcase_13 AC 351 ms
37,836 KB
testcase_14 AC 332 ms
36,696 KB
testcase_15 AC 329 ms
36,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

M = X[0] + Y[0]
for i in range(1, N):
  M = min(M, X[i] + Y[i])

print(M)
print(0)
for i in range(N):
  if X[i] <= M:
    print(X[i])
  elif Y[i] <= M:
    print(M - Y[i])
  else:
    print(0)
print(M)
0