from sys import stdin
T=int(stdin.readline())
for _ in range(T):
n=int(stdin.readline())
if n<=30:
print("NO")
else:
if n-30!=6 and n-30!=10 and n-30!=14:
print("YES")
print("6 10 14",n-30)
else:
if n==36:
print("YES")
print("5 6 10 15")
elif n==40:
print("YES")
print("6 9 10 15")
elif n==44:
print("YES")
print("6 7 10 21")
else:
print("NO")
A - Captain Flint and Crew Recruitment
from sys import stdin
T=int(stdin.readline())
for _ in range(T):
n=int(stdin.readline())
print("9"*(n-((n-1)//4+1))+"8"*((n-1)//4+1))
B - Captain Flint and a Long Voyage
'알고리즘 > Codeforces' 카테고리의 다른 글
Codeforces Round #663 (Div. 2) ABC (0) | 2020.08.10 |
---|---|
Codeforces Round #662 (Div. 2) ABC (0) | 2020.08.08 |
Educational Codeforces Round 92 (Rated for Div. 2) A (0) | 2020.08.06 |
Codeforces Round #658 (Div. 2) AB (0) | 2020.08.06 |
Codeforces Round #661 (Div. 3) ABC (0) | 2020.08.06 |
댓글