Submission #2270

#TimeUsernameProblemLanguageResultExecution timeMemory
2270rbwhddl2000생일수 I (GA4_birthday1)C11
0 / 100
65 ms784 KiB
#include<stdio.h> int main() { int n, i, a, j; scanf("%d", &n); for(i=1;i<=n;i++){ scanf("%d", &a); if(a%8 == 3 || a%8 == 5 || a%8 == 0){ if(a%8 ==0){ for(j=1;j<=a/8;j++)printf("8"); printf("\n"); }else{ printf("%d", a%8); for(j=1;j<=a/8;j++)printf("8"); printf("\n"); } }else{ if(a<8){ printf("-1\n"); }else{ if(a%8==1)printf("333"); if(a%8==2)printf("55"); if(a%8==4)printf("3333"); if(a%8==6)printf("3335"); if(a%8==7)printf("555"); for(j=2;j<=a/8;j++)printf("8"); printf("\n"); } } } 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...