Submission #7764

#TimeUsernameProblemLanguageResultExecution timeMemory
7764studenttest생일수 II (GA4_birthday2)C++98
10 / 100
1000 ms2128 KiB
#include<stdio.h> const long long int T=19980305; long long int ans; long long int ls[100010]; int l; bool check(int x) { while(x){ if(x%10!=3&&x%10!=5&&x%10!=8)return false; x/=10; } return true; } int main() { int x,y; scanf("%d%d",&x,&y); int i; for(i=x;i<=y;i++){ if(check(i)){ls[l]=i;l++;} } for(i=1;i<l;i++){ ans+=ls[i]*ls[i-1]; ans%=T; }printf("%lld",ans); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...