蟒蛇编码比赛 [英] python coding contest

查看:67
本文介绍了蟒蛇编码比赛的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我们正在举办一场蟒蛇编码比赛,我们甚至设法为获胜者提供了一个

的价格......

http://pycontest.net/


比赛恰好在22c3期间举行,我们将在那里出现


https://events.ccc.de/congress/2005/...coding_contest


请发送我的意见,建议和想法。


玩得开心,


-

Simon Hengel

解决方案

干净的想法!


我远不是一个体面的Python程序员,但我管理(为了好玩)

用单行代码完成;然而,它肯定比更易读的多线解决方案更长(以b / b
为单位)。

$ b $bAndré


Andréschrieb:

干净的想法!
确实

我远远不是一个体面的Python程序员,但我管理(为了好玩)
在一个单行中做到这一点;但是,与更易读的多线解决方案相比,它肯定更长(以字符数表示)。


我制作了一个352字节的可读版本和一个不可读的290

字节。但这是一个非常丑陋的lambda,地图,减少kludge。看起来像Perl。

André




Tobias


Simon Hengel写道:< blockquote class =post_quotes>您好,我们正在举办一场蟒蛇编码比赛,我们甚至设法为获胜者提供了一个价格......

http://pycontest.net/

比赛恰好在22c3期间举行,我们将在那里出现。

https://events.ccc.de/congress/2005/...coding_contest

请发给我评论,意见和建议。

有有趣,




定位是否重要?例如,假设我给它''123''是没关系

输出这个:


1

2 < br $> b $ b 3


或者它必须是123


Hello,
we are hosting a python coding contest an we even managed to provide a
price for the winner...

http://pycontest.net/

The contest is coincidentally held during the 22c3 and we will be
present there.

https://events.ccc.de/congress/2005/...coding_contest

Please send me comments, suggestions and ideas.

Have fun,

--
Simon Hengel

解决方案

Neat idea!

I''m far from being a decent Python programmer but I managed (for fun)
to do it in a one-liner; however, it was definitely longer (in term of
number of characters) than the more readable multi-line solution.

André


André schrieb:

Neat idea! Indeed

I''m far from being a decent Python programmer but I managed (for fun)
to do it in a one-liner; however, it was definitely longer (in term of
number of characters) than the more readable multi-line solution.
I made a readable version with 352 bytes and a non-readable with 290
bytes. But it''s a really ugly lambda, map, reduce kludge. Looks like Perl.

André



Tobias


Simon Hengel wrote:

Hello,
we are hosting a python coding contest an we even managed to provide a
price for the winner...

http://pycontest.net/

The contest is coincidentally held during the 22c3 and we will be
present there.

https://events.ccc.de/congress/2005/...coding_contest

Please send me comments, suggestions and ideas.

Have fun,



Does positioning matter? For example, say I give it ''123'' is it ok to
output this:

1
2
3

Or does it have to be 123


这篇关于蟒蛇编码比赛的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆