create account

RE: [Question] Mathematics × Programming Competition #8 [問題] 數學 × 程式編寫比賽 (第八回) by speeding

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @justyy/re-kenchung-question-mathematics-programming-competition-8-20171020t174626994z

· @speeding · (edited)
用一行python语句把这道题解了,我是不是疯了?
https://steemit.com/cn/@speeding/one-line-python-math-programming


print(int(sum(map(lambda d: 0.5 if d != ''.join(map(lambda i:'012xx59x86'[int(i)], d[::-1])) and ''.join(map(lambda i:'012xx59x86'[int(i)], d[::-1])) in ['%04d' % x for x in range(0, 10000)] else 1 , ['%04d' % x for x in range(0, 10000)]))))
properties (22)
authorspeeding
permlinkre-justyy-re-kenchung-question-mathematics-programming-competition-8-20171022t092830260z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1","links":["https://steemit.com/cn/@speeding/one-line-python-math-programming"]}
created2017-10-22 09:28:30
last_update2017-10-22 09:30:30
depth2
children2
last_payout2017-10-29 09:28:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length335
author_reputation1,172,222,545,920
root_title"[Question] Mathematics × Programming Competition #8 [問題] 數學 × 程式編寫比賽 (第八回)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id18,284,113
net_rshares0
@justyy ·
这个可以有,PYTHON一向以一行代码解题著称,不过写出来的代码没有维护性,很难改,用于快速刷题可以的。
properties (22)
authorjustyy
permlinkre-speeding-re-justyy-re-kenchung-question-mathematics-programming-competition-8-20171022t095518265z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-10-22 09:55:21
last_update2017-10-22 09:55:21
depth3
children1
last_payout2017-10-29 09:55:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length52
author_reputation280,616,224,641,976
root_title"[Question] Mathematics × Programming Competition #8 [問題] 數學 × 程式編寫比賽 (第八回)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id18,285,763
net_rshares0
@speeding ·
只是好玩
properties (22)
authorspeeding
permlinkre-justyy-re-speeding-re-justyy-re-kenchung-question-mathematics-programming-competition-8-20171022t142011483z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-10-22 14:20:15
last_update2017-10-22 14:20:15
depth4
children0
last_payout2017-10-29 14:20:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4
author_reputation1,172,222,545,920
root_title"[Question] Mathematics × Programming Competition #8 [問題] 數學 × 程式編寫比賽 (第八回)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id18,303,180
net_rshares0