結果

問題 No.1837 Same but Different
ユーザー gew1fw
提出日時 2025-06-12 20:56:32
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 320 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 82,340 KB
実行使用メモリ 61,540 KB
最終ジャッジ日時 2025-06-12 21:00:05
合計ジャッジ時間 4,396 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

# Construct A
a = [99, 824]
current = 4353
for _ in range(n - 2):
    a.append(current)
    current += 1

sum_a = sum(a)

# Construct B
b = list(range(n - 1))  # 0, 1, 2, ..., n-2
sum_b_part = sum(b)
s = sum_a - sum_b_part
b.append(s)

# Output
print(' '.join(map(str, a)))
print(' '.join(map(str, b)))
0