跳到正文

题解

题解:P11701 [ROIR 2025] 平方差

ciyaoshc约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2025年12月12日
篇幅
约 1 分钟
获赞
1
题目
P11701

版本

  1. v1当前

上代码 #include <bits/stdc++.h> using namespace std; const int N=1e6+10; #define ll long long ll d,l,r,ans; int main() { cin>>d>>l>>r; for(int i=1;ii<=d;i++){ ll temp=d/i; if(tempi==d){ ll x=(temp+i)/2; if(x2==temp+i){ ll y=xx-d; double t=sqrt(y); if(int(t)==t){ if(l<=y&&x*x<=r)ans++; } } } } cout<<ans; return 0; }

原文