This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
long long arr[100001];
int main()
{
int x,y,a=0,f,i,t;
long long s=0;
scanf("%d%d",&x,&y);
for(i=x;i<=y;i++)
{
t=i;
f=1;
while(1)
{
if(t%10!=3&&t%10!=5&&t%10!=8)
{
f=0;
break;
}
if(t<10)
break;
t/=10;
}
if(f==1)
arr[a++]=i;
}
for(i=0;i<a-1;i++)
{
s+=arr[i]*arr[i+1]%19980305;
s%=19980305;
}
printf("%lld",s);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |