結果
| 問題 |
No.2198 Concon Substrings (COuNt-CONstruct Version)
|
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2023-01-20 22:51:03 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 293 bytes |
| コンパイル時間 | 314 ms |
| コンパイル使用メモリ | 81,496 KB |
| 実行使用メモリ | 72,432 KB |
| 最終ジャッジ日時 | 2024-06-23 10:51:09 |
| 合計ジャッジ時間 | 13,323 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 74 WA * 30 |
ソースコード
def Gauss(n):
return (n + 1) * (n + 2)//2
M = int(input())
S = set()
for i in range(19999, -1, -1):
if M >= Gauss(i):
S.add(i)
M -= Gauss(i)
ans = []
for i in range(20000):
if i in S:
ans.append("con")
else:
ans.append("co")
print(*ans, sep="")
rlangevin