結果
| 問題 |
No.2198 Concon Substrings (COuNt-CONstruct Version)
|
| コンテスト | |
| ユーザー |
strangerxxx
|
| 提出日時 | 2023-01-20 22:58:45 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 613 bytes |
| コンパイル時間 | 483 ms |
| コンパイル使用メモリ | 82,564 KB |
| 実行使用メモリ | 580,196 KB |
| 最終ジャッジ日時 | 2024-06-23 10:57:54 |
| 合計ジャッジ時間 | 27,709 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 5 WA * 2 MLE * 1 OLE * 2 -- * 94 |
ソースコード
def resolve():
import sys
input = sys.stdin.readline
MOD = 998244353
INF = float("inf")
m = int(input())
if m == 0:
print("a")
return
print("co", end="")
x = m
dp = [1, 1, 0]
y = 1
while x:
a = y
b = a >> 1
s = "c" * (b - dp[0])
if s:
print(s, end="")
dp[0] = b
while dp[1] < a:
print("o", end="")
dp[1] += dp[0]
if x & 1:
print("n", end="")
dp[2] += dp[1]
x >>= 1
y <<= 1
if __name__ == "__main__":
resolve()
strangerxxx