結果
| 問題 | No.254 文字列の構成 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-01 19:11:37 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 488 bytes |
| 記録 | |
| コンパイル時間 | 272 ms |
| コンパイル使用メモリ | 77,600 KB |
| 最終ジャッジ日時 | 2025-12-03 22:33:42 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 16 WA * 14 |
ソースコード
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)]
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