結果
問題 |
No.2198 Concon Substrings (COuNt-CONstruct Version)
|
ユーザー |
|
提出日時 | 2023-01-20 23:53:38 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 591 bytes |
コンパイル時間 | 439 ms |
コンパイル使用メモリ | 82,160 KB |
実行使用メモリ | 71,568 KB |
最終ジャッジ日時 | 2024-06-23 11:51:28 |
合計ジャッジ時間 | 15,729 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 81 WA * 23 |
ソースコード
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))