This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<cstdio>
int main()
{
int i,j,n;
scanf("%d",&n);
for(i=0;i*3<=n;i++)if((n-i*3)%8==0)break;
if(i*3<=n)
{
for(j=0;j<i;j++)printf("3");
for(j=0;j<(n-i*3)/8;j++)printf("8");
}
else puts("-1");
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |