結果
問題 |
No.1837 Same but Different
|
ユーザー |
![]() |
提出日時 | 2025-06-12 16:15:34 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 427 bytes |
コンパイル時間 | 361 ms |
コンパイル使用メモリ | 82,276 KB |
実行使用メモリ | 61,324 KB |
最終ジャッジ日時 | 2025-06-12 16:16:15 |
合計ジャッジ時間 | 4,518 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 22 |
ソースコード
n = int(input()) # Construct A a = [99, 824] a += [4353 + i for i in range(n - 2)] # Construct B b = list(range(n - 2)) # 0, 1, ..., n-3 if n > 2: b.append(n - 2) # Add next consecutive number else: # For n=3, after 0,1, we add L directly pass # Calculate L sum_a = sum(a) sum_b_initial = sum(b) L = sum_a - sum_b_initial b.append(L) # Print the result print(' '.join(map(str, a))) print(' '.join(map(str, b)))