結果

問題 No.2748 Strange Clock
ユーザー tassei903tassei903
提出日時 2024-04-18 01:19:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 1,214 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 82,372 KB
実行使用メモリ 52,736 KB
最終ジャッジ日時 2024-10-09 19:02:05
合計ジャッジ時間 3,051 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

Ts=[
    [1,10],
    [1,142],
    [1,286,1438,1726],
    [1,5470,15262,20734],
    [1,15262,26206,41470,192094,207358,233566,248830],
    [1,264094,705022,2016862,2280958,2721886,2985982],
    [1,3250078,5971966,9222046,20637790,26609758,29859838,35831806],
    [1,80885662,182409118,194353054,235628638,247572574,349096030,429981694],
    [1,859963390,4299816958,5159780350],
    [1,16339304446,45578059774,61917364222],
    [1,123834728446,619173642238,743008370686],
    [1,2105190383614,6810910064638,8916100448254],
    [1,17832200896510,89161004482558,106993205379070],
    [1,1283918464548862],
    [1,2567836929097726,12839184645488638,15407021574586366]
  ]
Cnt=[
    [2,1],
    [6,3],
    [18,3,3,3],
    [54,6,6,15],
    [162,18,6,15,6,15,6,15],
    [486,18,54,12,42,6,111],
    [1458,18,243,18,18,18,207,207],
    [4374,108,18,18,18,18,108,1899],
    [13122,2187,2187,2187],
    [39366,4374,4374,10935],
    [118098,19683,19683,19683],
    [354294,39366,39366,98415],
    [1062882,177147,177147,177147],
    [3188646,1594323],
    [9565938,1594323,1594323,1594323]
  ]

N, M = map(int, input().split())
ans = 0
for i in range(len(Ts[N-1])):
    if Ts[N-1][i] > M:
        ans += Cnt[N-1][i]

print(ans)
0