結果

問題 No.2198 Concon Substrings (COuNt-CONstruct Version)
ユーザー rlangevin
提出日時 2023-01-20 22:54:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 307 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 82,032 KB
実行使用メモリ 72,708 KB
最終ジャッジ日時 2024-06-23 10:53:58
合計ジャッジ時間 10,197 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 104
権限があれば一括ダウンロードができます

ソースコード

diff #

def Gauss(n):
    return (n + 1) * (n + 2)//2

M = int(input())
L = [0] * 20000
for i in range(19999, -1, -1):
    while M >= Gauss(i):
        L[i] += 1
        M -= Gauss(i)
ans = []
for i in range(20000):
    ans.append("co")
    for j in range(L[i]):
        ans.append("n")
        
print(*ans, sep="")
0