結果
| 問題 | No.3156 Count That Day's N | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2025-05-23 19:57:36 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 286 bytes | 
| コンパイル時間 | 153 ms | 
| コンパイル使用メモリ | 82,912 KB | 
| 実行使用メモリ | 63,688 KB | 
| 最終ジャッジ日時 | 2025-05-23 19:57:41 | 
| 合計ジャッジ時間 | 3,073 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 28 WA * 4 | 
ソースコード
import math
K,N=map(int,input().split())
ans=set()
mxX=-(int(-math.pow(N,1/6)))
mxY=-(int(-math.pow(N,1/4)))
for x in range(1,mxX+1):
    for y in range(1,mxY+1):
        t=x**6+y**4
        if t<=10**15 and t%K==0 and ((t//K)**0.5).is_integer():
            ans.add(t)
print(len(ans))
            
            
            
        