Start: Apr, 17, 2017 10:00:00
Python程序设计基础培训第三次作业
End: Apr, 23, 2017 14:00:00
Contest has ended!
Time elapsed: 148:00:00
Time remaining: 00:00:00

Problem_ID: E
Result: Accepted
Time: 126ms
Memory: 21432kB
Author: yujianbo
In contest: 1087

1
2
3
4
5
6
7
n = int(raw_input().strip())
for i in range(n/7,-1,-1):
	if (n-7*i)%4==0:
		print '4'*((n-7*i)/4)+'7'*i
		break
if i==0 and (n-7*i)%4<>0:
	print -1