結果
| 問題 | 
                            No.254 文字列の構成
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2016-11-01 19:11:14 | 
| 言語 | Python2  (2.7.18)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 497 bytes | 
| コンパイル時間 | 146 ms | 
| コンパイル使用メモリ | 6,912 KB | 
| 実行使用メモリ | 6,912 KB | 
| 最終ジャッジ日時 | 2024-11-25 01:13:40 | 
| 合計ジャッジ時間 | 6,081 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 2 | 
| other | WA * 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 = 0
    while (n!=-1):
        ret += n
        n-=2
    return ret
for i in range(8001,501,-400):
    ls.append(((i-1)/2,calc(i)+2))
ls += [(100,10203),(50,2603),(0,3)] 
print ls
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