题目
Code
#include<bits/stdc++.h>
using namespace std;
int main() {
unsigned long long l,r,n,s,ans=1,a;
bool t;
cin>>l>>r;
for(int i=1; i<=1000000; i++){
n=i*i;
a=n;
if(n>=l&&n<=r){
s=0;
while(a){
s+=a%10;
a/=10;
}
t=true;
for(int j=2; j<s; j++)
if(s%j==0)t=false;
if(t)
ans=ans*n;
}
}
if(ans>1)cout<<ans%998244353;
else cout<<0;
return 0;
}
能麻烦各位大佬帮我调一下吗,就10分~