Lucky number

input a integer number, detect if the number is considered lucky. If the number is lucky, print "lucky number". If not, print "regular number"

Definition of lucky number: the sum of the first three digits equals the sum of the last three digits in a number.

截圖 2021-05-05 下午8.00.28.jpg

 

創作者介紹
創作者 Terror-P的部落格 的頭像
Terror-P

Terror-P的部落格

Terror-P 發表在 痞客邦 留言(0) 人氣( 8 )