結果
問題 | No.2198 Concon Substrings (COuNt-CONstruct Version) |
ユーザー | shobonvip |
提出日時 | 2023-01-20 22:54:13 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 60 ms / 2,000 ms |
コード長 | 718 bytes |
コンパイル時間 | 203 ms |
コンパイル使用メモリ | 82,544 KB |
実行使用メモリ | 69,788 KB |
最終ジャッジ日時 | 2024-06-23 10:53:47 |
合計ジャッジ時間 | 9,249 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 40 ms
54,268 KB |
testcase_01 | AC | 39 ms
55,656 KB |
testcase_02 | AC | 40 ms
54,956 KB |
testcase_03 | AC | 40 ms
54,324 KB |
testcase_04 | AC | 39 ms
54,188 KB |
testcase_05 | AC | 40 ms
55,108 KB |
testcase_06 | AC | 40 ms
55,856 KB |
testcase_07 | AC | 39 ms
54,480 KB |
testcase_08 | AC | 40 ms
55,664 KB |
testcase_09 | AC | 40 ms
55,540 KB |
testcase_10 | AC | 45 ms
60,568 KB |
testcase_11 | AC | 49 ms
63,192 KB |
testcase_12 | AC | 51 ms
64,708 KB |
testcase_13 | AC | 53 ms
66,128 KB |
testcase_14 | AC | 54 ms
66,140 KB |
testcase_15 | AC | 57 ms
69,220 KB |
testcase_16 | AC | 41 ms
55,044 KB |
testcase_17 | AC | 41 ms
54,860 KB |
testcase_18 | AC | 42 ms
54,972 KB |
testcase_19 | AC | 41 ms
55,300 KB |
testcase_20 | AC | 41 ms
54,580 KB |
testcase_21 | AC | 41 ms
54,764 KB |
testcase_22 | AC | 44 ms
61,620 KB |
testcase_23 | AC | 48 ms
62,676 KB |
testcase_24 | AC | 52 ms
65,092 KB |
testcase_25 | AC | 52 ms
66,220 KB |
testcase_26 | AC | 53 ms
66,364 KB |
testcase_27 | AC | 57 ms
68,236 KB |
testcase_28 | AC | 40 ms
54,716 KB |
testcase_29 | AC | 40 ms
54,308 KB |
testcase_30 | AC | 41 ms
54,944 KB |
testcase_31 | AC | 40 ms
55,576 KB |
testcase_32 | AC | 40 ms
54,088 KB |
testcase_33 | AC | 41 ms
54,764 KB |
testcase_34 | AC | 41 ms
55,016 KB |
testcase_35 | AC | 41 ms
55,908 KB |
testcase_36 | AC | 41 ms
55,028 KB |
testcase_37 | AC | 40 ms
54,656 KB |
testcase_38 | AC | 41 ms
54,328 KB |
testcase_39 | AC | 40 ms
54,576 KB |
testcase_40 | AC | 40 ms
55,676 KB |
testcase_41 | AC | 41 ms
54,532 KB |
testcase_42 | AC | 41 ms
54,768 KB |
testcase_43 | AC | 41 ms
55,076 KB |
testcase_44 | AC | 41 ms
54,600 KB |
testcase_45 | AC | 41 ms
54,612 KB |
testcase_46 | AC | 41 ms
54,304 KB |
testcase_47 | AC | 42 ms
54,844 KB |
testcase_48 | AC | 41 ms
54,476 KB |
testcase_49 | AC | 46 ms
60,732 KB |
testcase_50 | AC | 47 ms
61,600 KB |
testcase_51 | AC | 47 ms
62,568 KB |
testcase_52 | AC | 47 ms
62,644 KB |
testcase_53 | AC | 48 ms
63,744 KB |
testcase_54 | AC | 53 ms
64,188 KB |
testcase_55 | AC | 50 ms
64,288 KB |
testcase_56 | AC | 50 ms
63,484 KB |
testcase_57 | AC | 52 ms
65,024 KB |
testcase_58 | AC | 52 ms
65,420 KB |
testcase_59 | AC | 52 ms
65,676 KB |
testcase_60 | AC | 52 ms
66,824 KB |
testcase_61 | AC | 53 ms
65,680 KB |
testcase_62 | AC | 53 ms
66,952 KB |
testcase_63 | AC | 54 ms
66,624 KB |
testcase_64 | AC | 55 ms
66,908 KB |
testcase_65 | AC | 55 ms
69,100 KB |
testcase_66 | AC | 55 ms
67,632 KB |
testcase_67 | AC | 54 ms
66,904 KB |
testcase_68 | AC | 53 ms
66,508 KB |
testcase_69 | AC | 56 ms
67,904 KB |
testcase_70 | AC | 56 ms
68,956 KB |
testcase_71 | AC | 60 ms
68,780 KB |
testcase_72 | AC | 53 ms
66,292 KB |
testcase_73 | AC | 53 ms
66,084 KB |
testcase_74 | AC | 55 ms
67,460 KB |
testcase_75 | AC | 55 ms
69,044 KB |
testcase_76 | AC | 55 ms
66,484 KB |
testcase_77 | AC | 55 ms
66,424 KB |
testcase_78 | AC | 56 ms
69,788 KB |
testcase_79 | AC | 53 ms
66,752 KB |
testcase_80 | AC | 54 ms
68,024 KB |
testcase_81 | AC | 55 ms
67,836 KB |
testcase_82 | AC | 55 ms
67,564 KB |
testcase_83 | AC | 55 ms
67,684 KB |
testcase_84 | AC | 55 ms
66,968 KB |
testcase_85 | AC | 53 ms
64,760 KB |
testcase_86 | AC | 55 ms
67,056 KB |
testcase_87 | AC | 56 ms
69,352 KB |
testcase_88 | AC | 53 ms
65,736 KB |
testcase_89 | AC | 54 ms
67,132 KB |
testcase_90 | AC | 56 ms
68,260 KB |
testcase_91 | AC | 56 ms
68,188 KB |
testcase_92 | AC | 54 ms
66,896 KB |
testcase_93 | AC | 53 ms
67,264 KB |
testcase_94 | AC | 54 ms
67,632 KB |
testcase_95 | AC | 56 ms
68,592 KB |
testcase_96 | AC | 54 ms
66,996 KB |
testcase_97 | AC | 56 ms
68,340 KB |
testcase_98 | AC | 55 ms
68,588 KB |
testcase_99 | AC | 54 ms
67,744 KB |
testcase_100 | AC | 53 ms
68,276 KB |
testcase_101 | AC | 54 ms
66,700 KB |
testcase_102 | AC | 56 ms
68,540 KB |
testcase_103 | AC | 55 ms
67,196 KB |
testcase_104 | AC | 53 ms
66,784 KB |
testcase_105 | AC | 56 ms
67,924 KB |
testcase_106 | AC | 56 ms
68,828 KB |
testcase_107 | AC | 54 ms
68,188 KB |
ソースコード
import random def judge(s): r = 0 g = 0 b = 0 for i in s: if i == 0: r += 1 elif i == 1: g += r else: b += g return b m = int(input()) r = 0 f = 0 for i in range(1, 300000): r = i * (i + 1) * (i + 2) // 6 f = i if m <= r: break g = r - m s = [i%3 for i in range(3 * f)] # r - i // 2 - popcount(i) = g # なんかないかな~ v = 1 for i in range(100000): if g - v >= 0: g -= v v += 1 else: break #print(v) #print(g) for l in range(v): if v - l - 1 == g: pass else: s[3 * l + 1], s[3 * l + 2] = s[3 * l + 2], s[3 * l + 1] #print(judge(s)) ans = [] for i in s: if i == 0: ans.append("c") elif i == 1: ans.append("o") else: ans.append("n") print("".join(ans))