結果
| 問題 |
No.2198 Concon Substrings (COuNt-CONstruct Version)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-01-27 22:47:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 570 bytes |
| コンパイル時間 | 169 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 838,476 KB |
| 最終ジャッジ日時 | 2024-06-28 07:45:37 |
| 合計ジャッジ時間 | 6,840 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 6 WA * 4 MLE * 1 -- * 93 |
ソースコード
from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline
M = int(input())
def fcr(n):
ng = math.ceil(n**(1/3)) + 100
ok = math.ceil(n**(1/3)) - 100
while ng-ok>1:
mid = (ng+ok)//2
if mid**3<=n:
ok = mid
else:
ng = mid
return ok
N = fcr(M)
delta = M - N**3
if N**3+N > M:
N -= 1
Y = N-1
Z = N
W = N
X = M - N**3 - N
ans = ['c','o'] + ['n']*X + ['c']*Y + ['o']*Z + ['n']*W
print(''.join(ans))