Submission #2937

#TimeUsernameProblemLanguageResultExecution timeMemory
2937imsifile생일수 I (GA4_birthday1)C++98
14 / 100
68 ms1088 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...