結果

問題 No.254 文字列の構成
ユーザー nebukuro09nebukuro09
提出日時 2017-03-16 15:18:15
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 215 bytes
コンパイル時間 45 ms
コンパイル使用メモリ 6,592 KB
実行使用メモリ 6,296 KB
最終ジャッジ日時 2023-09-17 05:13:27
合計ジャッジ時間 2,476 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,208 KB
testcase_01 AC 12 ms
6,252 KB
testcase_02 AC 12 ms
6,216 KB
testcase_03 AC 12 ms
6,096 KB
testcase_04 AC 11 ms
6,168 KB
testcase_05 AC 11 ms
6,164 KB
testcase_06 AC 11 ms
6,120 KB
testcase_07 AC 11 ms
6,096 KB
testcase_08 AC 11 ms
6,096 KB
testcase_09 AC 11 ms
6,260 KB
testcase_10 AC 11 ms
6,096 KB
testcase_11 AC 11 ms
6,096 KB
testcase_12 AC 13 ms
6,184 KB
testcase_13 AC 11 ms
6,252 KB
testcase_14 AC 11 ms
6,096 KB
testcase_15 AC 11 ms
6,172 KB
testcase_16 AC 13 ms
6,248 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 24 ms
6,248 KB
testcase_20 AC 17 ms
6,216 KB
testcase_21 AC 20 ms
6,232 KB
testcase_22 AC 15 ms
6,124 KB
testcase_23 AC 20 ms
6,156 KB
testcase_24 AC 20 ms
6,160 KB
testcase_25 AC 20 ms
6,152 KB
testcase_26 AC 18 ms
6,140 KB
testcase_27 AC 24 ms
6,172 KB
testcase_28 AC 23 ms
6,288 KB
testcase_29 AC 21 ms
6,160 KB
testcase_30 AC 19 ms
6,224 KB
testcase_31 AC 14 ms
6,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from string import ascii_lowercase

N = input()
S = ''
alp = ascii_lowercase[2:]

N -= 1
S += 'a'
i = 3
while i <= N:
    S += 'ba'
    N -= i
    i += 2
for i in xrange(N):
    S += alp[i%24]
        
print S
    
0