結果

問題 No.3156 Count That Day's N
ユーザー tkykwtnb
提出日時 2025-05-23 20:03:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 3,000 ms
コード長 244 bytes
コンパイル時間 278 ms
コンパイル使用メモリ 82,780 KB
実行使用メモリ 63,684 KB
最終ジャッジ日時 2025-05-23 20:03:23
合計ジャッジ時間 3,362 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

K,N=map(int,input().split())
ans=set()
x=1
y=1
while x**6<=N-y**4:
    while y**4<=N-x**6:
        t=x**6+y**4
        if t<=10**15 and t%K==0 and ((t//K)**0.5).is_integer():
            ans.add(t)
        y+=1
    x+=1
    y=1
print(len(ans))
0