Submission #2937

# Submission time Handle Problem Language Result Execution time Memory
2937 2013-08-13T10:33:53 Z imsifile 생일수 I (GA4_birthday1) C++
14 / 100
68 ms 1088 KB
#include<stdio.h>
#define rp(a,b) for(i=b;i--;)putchar(a)

int m[8]={0,9,10,3,12,5,6,15};

void t(){
	int x,i,j;
	scanf("%d",&x),j=m[x%8];
	if(x<j)puts("-1");
	else{
		if(j%5)rp('3',j/3);
		else rp('5',j/5);
		rp('8',(x-j)/8);puts("");
	}
}

int main(){
	int n;
	for(scanf("%d",&n);n--;)t();
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1088 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1088 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 68 ms 1088 KB Output isn't correct
2 Halted 0 ms 0 KB -