結果
問題 | No.2198 Concon Substrings (COuNt-CONstruct Version) |
ユーザー |
|
提出日時 | 2023-01-20 23:54:42 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 77 ms / 2,000 ms |
コード長 | 591 bytes |
コンパイル時間 | 261 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 67,840 KB |
最終ジャッジ日時 | 2024-06-23 11:52:17 |
合計ジャッジ時間 | 10,406 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 104 |
ソースコード
import sysfrom collections import deque, Counterinput = lambda: sys.stdin.readline().rstrip()ii = lambda: int(input())mi = lambda: map(int, input().split())li = lambda: list(mi())inf = 2 ** 63 - 1mod = 998244353import randomm = ii()a = []cnt = 0for i in range(20000):cnt += ia.append(cnt)x = {}for i in range(19999, 0, -1):if m - a[i] >= 0:x[i] = m // a[i]m -= a[i] * x[i]ans = []for i in range(1, 20001):ans.append('c')ans.append('o')if i in x:for _ in range(x[i]):ans.append('n')print(''.join(ans))