結果

問題 No.2198 Concon Substrings (COuNt-CONstruct Version)
コンテスト
ユーザー Shirotsume
提出日時 2023-01-20 23:53:38
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 591 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 170 ms
コンパイル使用メモリ 85,404 KB
実行使用メモリ 72,020 KB
最終ジャッジ日時 2026-03-08 06:06:38
合計ジャッジ時間 13,805 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 81 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
from collections import deque, Counter
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353
import random

m = ii()
if m == 0:
    print('iamtourist')
    exit()
a = []

cnt = 0

for i in range(20000):
    cnt += i
    a.append(cnt)

x = []
for i in range(19999, 0, -1):
    if m - a[i] >= 0:
        x.append(i)
        m -= a[i]
ans = []
for i in range(1, 20001):
    ans.append('c')
    ans.append('o')
    if i in x:
        ans.append('n')
print(''.join(ans))
0