답안 #1998

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1998 2013-07-19T15:07:32 Z gs13105 생일수 II (GA4_birthday2) C++
10 / 100
202 ms 2108 KB
#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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1668 KB Output is correct
2 Correct 0 ms 1668 KB Output is correct
3 Correct 0 ms 1668 KB Output is correct
4 Correct 0 ms 1668 KB Output is correct
5 Correct 0 ms 1668 KB Output is correct
6 Correct 0 ms 1668 KB Output is correct
7 Correct 0 ms 1668 KB Output is correct
8 Correct 0 ms 1668 KB Output is correct
9 Correct 0 ms 1668 KB Output is correct
10 Correct 0 ms 1668 KB Output is correct
11 Correct 0 ms 1668 KB Output is correct
12 Correct 0 ms 1668 KB Output is correct
13 Correct 0 ms 1668 KB Output is correct
14 Correct 0 ms 1668 KB Output is correct
15 Correct 0 ms 1668 KB Output is correct
16 Correct 0 ms 1668 KB Output is correct
17 Correct 0 ms 1668 KB Output is correct
18 Correct 0 ms 1668 KB Output is correct
19 Correct 0 ms 1668 KB Output is correct
20 Correct 0 ms 1668 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 202 ms 1668 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 1668 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 2100 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 2108 KB Output isn't correct
2 Halted 0 ms 0 KB -