python生日快乐不同的人代码_祝我生日快乐!

J 79

echo((6!:0'')(('',:'Happy birthday to me!'){~])@:-:&(1 2&{)&:>])1{,1!:0{:4!:3''

奖励版本120-15%= 102

当他们两个都过生日时,我是否还能同时打印两个字?

echo((2 6$(6!:0 '') , 0 2 7)(' ','Happy birthday to ',"2 1]3 5$'you! me! both!'){~#.@:(-:&(1 2&{)"1)&:>])1{,1!:0{:4!:3''

说明(从右到左):

last =: {:4!:3'' NB. Take the last script run (i.e. the file itself)

time =: 1{,1!:0 last NB. the modification time is the second element in that file's listing

火车的中心动词

unbox_both =: &:> NB. unboxes left and right argument

match =: -:&(1 2&{)"1 NB. for each date given, left and right, compare them

to_int =: #. NB. convert boolean to int

from =: {~ NB. from the left array, take element right.

NB. H contains messages an empty row, appended to all combinations of messages.

H =: (' ','Happy birthday to ',"2 1]3 5$'you! me! both!')

V =: (H from to_int)@:match unbox_both NB. after unboxing and comparing,

NB. select the according message

中央火车的左齿:

dates=: (2 6$(6!:0 '') , 0 2 7) NB. the current date, and the relevant fields of my birthday.

NB. Combining the bricks:

echo (dates V ]) time NB. output the monads result on time.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值