結果

問題 No.3287 Golden Ring
ユーザー Facade
提出日時 2025-10-03 21:53:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 216 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 82,884 KB
実行使用メモリ 64,300 KB
最終ジャッジ日時 2025-10-03 21:54:02
合計ジャッジ時間 1,908 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

from random import *
n=int(input())
def solve(n):
    if(n==2):
        print("No")
        exit()
    a=[i+1 for i in range(n)]
    if(n%2==0):
        a[-1],a[-2]=a[-2],a[-1]
    print("Yes")
    print(*a)
solve(n)
0