結果

問題 No.254 文字列の構成
ユーザー niyarinniyarin
提出日時 2016-11-01 20:31:35
言語 Python2
(2.7.18)
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 564 bytes
コンパイル時間 121 ms
コンパイル使用メモリ 7,196 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-05-03 20:55:24
合計ジャッジ時間 4,001 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
6,816 KB
testcase_01 AC 81 ms
6,940 KB
testcase_02 AC 82 ms
6,940 KB
testcase_03 AC 80 ms
6,944 KB
testcase_04 AC 80 ms
6,940 KB
testcase_05 AC 80 ms
6,940 KB
testcase_06 AC 80 ms
6,940 KB
testcase_07 AC 81 ms
6,940 KB
testcase_08 AC 80 ms
6,940 KB
testcase_09 AC 78 ms
6,944 KB
testcase_10 AC 81 ms
6,944 KB
testcase_11 AC 80 ms
6,944 KB
testcase_12 AC 80 ms
6,940 KB
testcase_13 AC 79 ms
6,940 KB
testcase_14 AC 78 ms
6,940 KB
testcase_15 AC 79 ms
6,944 KB
testcase_16 AC 78 ms
6,944 KB
testcase_17 AC 78 ms
6,940 KB
testcase_18 AC 78 ms
6,940 KB
testcase_19 AC 78 ms
6,944 KB
testcase_20 AC 80 ms
6,944 KB
testcase_21 AC 83 ms
6,944 KB
testcase_22 AC 78 ms
6,940 KB
testcase_23 AC 78 ms
6,944 KB
testcase_24 AC 77 ms
6,940 KB
testcase_25 AC 78 ms
6,944 KB
testcase_26 AC 78 ms
6,944 KB
testcase_27 AC 78 ms
6,944 KB
testcase_28 AC 77 ms
6,944 KB
testcase_29 AC 79 ms
6,940 KB
testcase_30 AC 79 ms
6,940 KB
testcase_31 AC 81 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
n = N
"""
ls = [(4000,16008003),(3000,9006003),(2500,6255003),(500,251003),(400,160803),(250,63003),(100,10203),(50,2603),(0,3)] 

"""
ls = []
def calc(n):
    ret = 0
    while (n!=-1):
        ret += n
        n-=2
    return ret

for i in range(24,8,-1):
    z = i*2500+1
    ls.append(((z-1)/2,calc(z)+2))

for i in range(15001,501,-50):
    ls.append(((i-1)/2,calc(i)+2))
ls += [(100,10203),(50,2603),(0,3)] 


ans = ""
for p,q in ls:
    base = "a" + "xy"*p + "x" + "b"
    a = n/q
    n = n%q
    ans = ans + base*a

ans += "io"[:n]

print ans 
0