結果
| 問題 | No.2198 Concon Substrings (COuNt-CONstruct Version) |
| コンテスト | |
| ユーザー |
strangerxxx
|
| 提出日時 | 2023-01-20 22:58:45 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 613 bytes |
| 記録 | |
| コンパイル時間 | 249 ms |
| コンパイル使用メモリ | 95,336 KB |
| 実行使用メモリ | 85,760 KB |
| 最終ジャッジ日時 | 2026-07-27 20:04:19 |
| 合計ジャッジ時間 | 27,480 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 5 WA * 2 OLE * 3 -- * 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