結果

問題 No.254 文字列の構成
ユーザー vwxyzvwxyz
提出日時 2023-07-14 05:19:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 245 bytes
コンパイル時間 893 ms
コンパイル使用メモリ 10,508 KB
実行使用メモリ 8,376 KB
最終ジャッジ日時 2023-10-13 17:39:06
合計ジャッジ時間 5,891 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
7,820 KB
testcase_01 AC 19 ms
7,740 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 18 ms
7,872 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 18 ms
7,824 KB
testcase_09 AC 19 ms
7,812 KB
testcase_10 AC 18 ms
7,784 KB
testcase_11 WA -
testcase_12 AC 18 ms
7,820 KB
testcase_13 AC 17 ms
7,784 KB
testcase_14 AC 18 ms
7,784 KB
testcase_15 WA -
testcase_16 AC 17 ms
7,776 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 17 ms
7,744 KB
testcase_24 WA -
testcase_25 AC 17 ms
8,172 KB
testcase_26 WA -
testcase_27 AC 18 ms
8,204 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline=sys.stdin.readline

N=int(readline())
alp=[chr(i) for i in range(97,97+26)]
ans=[]
for n in range(33000,0,-1):
    if n*n<=N:
        a,b=alp.pop(),alp.pop()
        ans.append(a+(b+a)*(n-1))
        N-=n*n
print(*ans,sep="")
0