add: boj/10610.py

This commit is contained in:
Gyubin Han
2024-05-09 01:03:17 +09:00
parent e2cd3100cd
commit 143d40d2a8

16
boj/10610.py Normal file
View File

@@ -0,0 +1,16 @@
n=input()
narr=[]
for i in n:
narr.append(int(i))
narr.sort(reverse=True)
s=narr[0]
for i in range(1,len(narr)):
s*=10
s+=narr[i]
if s%30==0:
print(s)
else:
print(-1)