結果

問題 No.1837 Same but Different
ユーザー fairy_lettuce
提出日時 2022-02-11 22:19:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 228 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2024-06-27 19:35:48
合計ジャッジ時間 3,632 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 7 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=[]
b=[]
asum=0
bsum=0
s=1
if n%3==2:
    s=2
for i in range(n):
    p=0
    if i>=n*2//3:
        p=3
    a.append(3*i+p)
    asum+=3*i+p
    b.append(3*i+s)
    bsum+=3*i+s
a[n-1]+=bsum-asum
print(*a)
print(*b)
0