Submission #2231

#TimeUsernameProblemLanguageResultExecution timeMemory
2231cki86201생일수 II (GA4_birthday2)C++98
10 / 100
330 ms2104 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...