結果
問題 |
No.2198 Concon Substrings (COuNt-CONstruct Version)
|
ユーザー |
![]() |
提出日時 | 2023-01-20 23:11:49 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 820 bytes |
コンパイル時間 | 363 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 81,180 KB |
最終ジャッジ日時 | 2024-06-23 11:13:18 |
合計ジャッジ時間 | 24,591 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 8 WA * 96 |
ソースコード
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: b = 1 << int(y**0.5).bit_length() if y == 1: print("o", end="") dp[1] += 1 elif y == 2: print("co", end="") dp[0] += 1 dp[1] += dp[0] else: while dp[0] < b: print("c", end="") dp[0] += 1 while dp[1] < y: 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()