結果
問題 | No.254 文字列の構成 |
ユーザー |
|
提出日時 | 2016-11-01 20:31:35 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 86 ms / 5,000 ms |
コード長 | 564 bytes |
コンパイル時間 | 156 ms |
コンパイル使用メモリ | 6,952 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-25 01:18:52 |
合計ジャッジ時間 | 3,995 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 30 |
ソースコード
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 = 0while (n!=-1):ret += nn-=2return retfor i in range(24,8,-1):z = i*2500+1ls.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/qn = n%qans = ans + base*aans += "io"[:n]print ans