結果
問題 | No.600 かい文回 |
ユーザー |
![]() |
提出日時 | 2024-08-08 02:43:55 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 481 bytes |
コンパイル時間 | 540 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-08-08 02:43:59 |
合計ジャッジ時間 | 2,528 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 WA * 3 |
ソースコード
import sysinput = sys.stdin.readlinedef calc(N,x):#print(N,x)if N==0:return []if N==1:return [x]if N%2==1:return [x]+calc(N-1,x+1)two=0k=Nwhile k%2==0:two+=1k//=2if k==1:return [x]*(two)else:return [x]*(two+1)+calc(k-1,x+1)#print(calc(25,1))N=int(input())ANS=calc(N,1)ANS=ANS+ANS[::-1]for i in range(len(ANS)):ANS[i]=chr(ANS[i]+96)print("".join(ANS))