Python论坛  - 讨论区

标题:[python-chinese] 给大家出个智力题,要求用python算出

2007年11月29日 星期四 14:17

篱笆 nameliba在gmail.com
星期四 十一月 29 14:17:36 HKT 2007

ÎÒУ¿ªÕ¹ÁË¢ñ¡¢¢ò¡¢¢óÈýÃÅÑ¡Ð޿Σ¬Ä³°àÓÐ50ÈË,Ñ¡ÐÞ¢ñµÄÓÐ38ÈË¡¢
Ñ¡ÐÞ¢òµÄÓÐ35ÈË£¬Ñ¡ÐÞ¢óµÄÓÐ31ÈË£¬¼æÑ¡¢ñ¡¢¢òÕâÁ½Ãſγ̵ÄÓÐ29ÈË£¬
¼æÑ¡¢ñ¡¢¢óÕâÁ½Ãſγ̵ÄÓÐ28ÈË£¬¼æÑ¡¢ò¡¢¢óÕâ2Ãſγ̵ÄÓÐ26ÈË£¬
ÈýÃŶ¼Ñ¡ÐÞÁ˵ÄÓÐ24ÈË£¬ÎÊ£º´Ë°àÈýÃŶ¼Î´Ñ¡ÐÞµÄÓжàÉÙÈË£¿

ÓÃpythonд³öËã·¨
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071129/54da1082/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月29日 星期四 14:32

Leo Jay python.leojay在gmail.com
星期四 十一月 29 14:32:28 HKT 2007

On Nov 29, 2007 2:17 PM, 篱笆 <nameliba在gmail.com> wrote:
> 我校开展了Ⅰ、Ⅱ、Ⅲ三门选修课,某班有50人,选修Ⅰ的有38人、
> 选修Ⅱ的有35人,选修Ⅲ的有31人,兼选Ⅰ、Ⅱ这两门课程的有29人,
> 兼选Ⅰ、Ⅲ这两门课程的有28人,兼选Ⅱ、Ⅲ这2门课程的有26人,
> 三门都选修了的有24人,问:此班三门都未选修的有多少人?
>
> 用python写出算法

这还要什么用python写算法吗?
AUBUC = A+B+C-AB-AC-BC+ABC = 38 + 35 + 31 - 29 - 28 - 26 + 24 = 45
所以,三门都未选的应该就是50-45=5人啊。


-- 
Best Regards,
Leo Jay

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月29日 星期四 14:44

篱笆 nameliba在gmail.com
星期四 十一月 29 14:44:56 HKT 2007

ºÇºÇ£®ÄãÄÔ×ÓÕæºÃʹ

ÔÚ07-11-29£¬Leo Jay <python.leojay在gmail.com> дµÀ£º
>
> On Nov 29, 2007 2:17 PM, Àé°Ê <nameliba在gmail.com> wrote:
> > ÎÒУ¿ªÕ¹ÁË¢ñ¡¢¢ò¡¢¢óÈýÃÅÑ¡Ð޿Σ¬Ä³°àÓÐ50ÈË,Ñ¡ÐÞ¢ñµÄÓÐ38ÈË¡¢
> > Ñ¡ÐÞ¢òµÄÓÐ35ÈË£¬Ñ¡ÐÞ¢óµÄÓÐ31ÈË£¬¼æÑ¡¢ñ¡¢¢òÕâÁ½Ãſγ̵ÄÓÐ29ÈË£¬
> > ¼æÑ¡¢ñ¡¢¢óÕâÁ½Ãſγ̵ÄÓÐ28ÈË£¬¼æÑ¡¢ò¡¢¢óÕâ2Ãſγ̵ÄÓÐ26ÈË£¬
> > ÈýÃŶ¼Ñ¡ÐÞÁ˵ÄÓÐ24ÈË£¬ÎÊ£º´Ë°àÈýÃŶ¼Î´Ñ¡ÐÞµÄÓжàÉÙÈË£¿
> >
> > ÓÃpythonд³öËã·¨
>
> Õ⻹ҪʲôÓÃpythonдËã·¨Âð£¿
> AUBUC = A+B+C-AB-AC-BC+ABC = 38 + 35 + 31 - 29 - 28 - 26 + 24 = 45
> ËùÒÔ£¬ÈýÃŶ¼Î´Ñ¡µÄÓ¦¸Ã¾ÍÊÇ50-45=5ÈË°¡¡£
>
>
> --
> Best Regards,
> Leo Jay
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071129/377762b8/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月29日 星期四 14:48

陆星光 xglu在iflytek.com
星期四 十一月 29 14:48:15 HKT 2007

ÎÒ¾õµÃѧУµÄºÃ¶àÏ°ÌⶼÊDZȽϸãЦµÄÌâÄ¿

 

  _____  

·¢¼þÈË: python-chinese-bounces在lists.python.cn
[mailto:python-chinese-bounces在lists.python.cn] ´ú±í Àé°Ê
·¢ËÍʱ¼ä: 2007Äê11ÔÂ29ÈÕ 14:45
ÊÕ¼þÈË: python-chinese在lists.python.cn
Ö÷Ìâ: Re: [python-chinese]¸ø´ó¼Ò³ö¸öÖÇÁ¦Ìâ,ÒªÇóÓÃpythonËã³öÀ´

 

ºÇºÇ£®ÄãÄÔ×ÓÕæºÃʹ

ÔÚ07-11-29£¬Leo Jay <python.leojay在gmail.com> дµÀ£º 

On Nov 29, 2007 2:17 PM, Àé°Ê <nameliba在gmail.com> wrote:
> ÎÒУ¿ªÕ¹ÁË¢ñ¡¢¢ò¡¢¢óÈýÃÅÑ¡Ð޿Σ¬Ä³°àÓÐ50ÈË,Ñ¡ÐÞ¢ñµÄÓÐ38ÈË¡¢ 
> Ñ¡ÐÞ¢òµÄÓÐ35ÈË£¬Ñ¡ÐÞ¢óµÄÓÐ31ÈË£¬¼æÑ¡¢ñ¡¢¢òÕâÁ½Ãſγ̵ÄÓÐ29ÈË£¬
> ¼æÑ¡¢ñ¡¢¢óÕâÁ½Ãſγ̵ÄÓÐ28ÈË£¬¼æÑ¡¢ò¡¢¢óÕâ2Ãſγ̵ÄÓÐ26ÈË£¬
> ÈýÃŶ¼Ñ¡ÐÞÁ˵ÄÓÐ24ÈË£¬ÎÊ£º´Ë°àÈýÃŶ¼Î´Ñ¡ÐÞµÄÓжàÉÙÈË£¿
>
> ÓÃpythonд³öËã·¨

Õ⻹ҪʲôÓÃpythonдËã·¨Âð£¿
AUBUC = A+B+C-AB-AC-BC+ABC = 38 + 35 + 31 - 29 - 28 - 26 + 24 = 45 
ËùÒÔ£¬ÈýÃŶ¼Î´Ñ¡µÄÓ¦¸Ã¾ÍÊÇ50-45=5ÈË°¡¡£


--
Best Regards,
Leo Jay
_______________________________________________
python-chinese
Post: send python-chinese在lists.python.cn 
Subscribe: send subscribe to python-chinese-request在lists.python.cn
Unsubscribe: send unsubscribe to
python-chinese-request在lists.python.cn>
python-chinese-request在lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese

 

-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071129/7e444b91/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月29日 星期四 14:50

xxmplus xxmplus在gmail.com
星期四 十一月 29 14:50:01 HKT 2007

虽然mailinglist不能灌水,但我还是忍不住要点点点。。。

On Nov 29, 2007 4:44 PM, 篱笆 <nameliba at gmail.com> wrote:
> 呵呵.你脑子真好使
>
>
> 在07-11-29,Leo Jay <python.leojay at gmail.com> 写道:
> > On Nov 29, 2007 2:17 PM, 篱笆 <nameliba at gmail.com> wrote:
> > > 我校开展了Ⅰ、Ⅱ、Ⅲ三门选修课,某班有50人,选修Ⅰ的有38人、
> > > 选修Ⅱ的有35人,选修Ⅲ的有31人,兼选Ⅰ、Ⅱ这两门课程的有29人,
> > > 兼选Ⅰ、Ⅲ这两门课程的有28人,兼选Ⅱ、Ⅲ这2门课程的有26人,
> > > 三门都选修了的有24人,问:此班三门都未选修的有多少人?
> > >
> > > 用python写出算法
> >
> > 这还要什么用python写算法吗?
> > AUBUC = A+B+C-AB-AC-BC+ABC = 38 + 35 + 31 - 29 - 28 - 26 + 24 = 45
> > 所以,三门都未选的应该就是50-45=5人啊。
> >
> >
> > --
> > Best Regards,
> > Leo Jay
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese at lists.python.cn
> > Subscribe: send subscribe to python-chinese-request at lists.python.cn
> > Unsubscribe: send unsubscribe to   python-chinese-request at lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



-- 
Any complex technology which doesn't come with documentation must be the best
available.

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月29日 星期四 16:22

Frank Tian plumpbird在gmail.com
星期四 十一月 29 16:22:17 HKT 2007

Сѧ°ÂÊýµÄµÄÌâ ÁùÄ꼶µÄʱºò¾­³£×ö¡£¡£¡£

On Nov 29, 2007 2:50 PM, xxmplus <xxmplus在gmail.com> wrote:

> ËäÈ»mailinglist²»ÄܹàË®£¬µ«ÎÒ»¹ÊÇÈ̲»×¡Òªµãµãµã¡£¡£¡£
>
> On Nov 29, 2007 4:44 PM, Àé°Ê <nameliba在gmail.com> wrote:
> > ºÇºÇ£®ÄãÄÔ×ÓÕæºÃʹ
> >
> >
> > ÔÚ07-11-29£¬Leo Jay <python.leojay在gmail.com> дµÀ£º
> > > On Nov 29, 2007 2:17 PM, Àé°Ê <nameliba在gmail.com> wrote:
> > > > ÎÒУ¿ªÕ¹ÁË¢ñ¡¢¢ò¡¢¢óÈýÃÅÑ¡Ð޿Σ¬Ä³°àÓÐ50ÈË,Ñ¡ÐÞ¢ñµÄÓÐ38ÈË¡¢
> > > > Ñ¡ÐÞ¢òµÄÓÐ35ÈË£¬Ñ¡ÐÞ¢óµÄÓÐ31ÈË£¬¼æÑ¡¢ñ¡¢¢òÕâÁ½Ãſγ̵ÄÓÐ29ÈË£¬
> > > > ¼æÑ¡¢ñ¡¢¢óÕâÁ½Ãſγ̵ÄÓÐ28ÈË£¬¼æÑ¡¢ò¡¢¢óÕâ2Ãſγ̵ÄÓÐ26ÈË£¬
> > > > ÈýÃŶ¼Ñ¡ÐÞÁ˵ÄÓÐ24ÈË£¬ÎÊ£º´Ë°àÈýÃŶ¼Î´Ñ¡ÐÞµÄÓжàÉÙÈË£¿
> > > >
> > > > ÓÃpythonд³öËã·¨
> > >
> > > Õ⻹ҪʲôÓÃpythonдËã·¨Âð£¿
> > > AUBUC = A+B+C-AB-AC-BC+ABC = 38 + 35 + 31 - 29 - 28 - 26 + 24 = 45
> > > ËùÒÔ£¬ÈýÃŶ¼Î´Ñ¡µÄÓ¦¸Ã¾ÍÊÇ50-45=5ÈË°¡¡£
> > >
> > >
> > > --
> > > Best Regards,
> > > Leo Jay
> > > _______________________________________________
> > > python-chinese
> > > Post: send python-chinese在lists.python.cn
> > > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > > Unsubscribe: send unsubscribe to
> python-chinese-request在lists.python.cn
> > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
>
>
>
> --
> Any complex technology which doesn't come with documentation must be the
> best
> available.
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071129/6b24fa77/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月29日 星期四 21:22

eho eho jiulang.eho在gmail.com
星期四 十一月 29 21:22:35 HKT 2007

¸ãЦ~~¹þ¹þ

ÔÚ07-11-29£¬Frank Tian <plumpbird在gmail.com> дµÀ£º
>
> Сѧ°ÂÊýµÄµÄÌâ ÁùÄ꼶µÄʱºò¾­³£×ö¡£¡£¡£
>
> On Nov 29, 2007 2:50 PM, xxmplus <xxmplus在gmail.com> wrote:
>
> > ËäÈ»mailinglist²»ÄܹàË®£¬µ«ÎÒ»¹ÊÇÈ̲»×¡Òªµãµãµã¡£¡£¡£
> >
> > On Nov 29, 2007 4:44 PM, Àé°Ê <nameliba在gmail.com> wrote:
> > > ºÇºÇ£®ÄãÄÔ×ÓÕæºÃʹ
> > >
> > >
> > > ÔÚ07-11-29£¬Leo Jay < python.leojay在gmail.com> дµÀ£º
> > > > On Nov 29, 2007 2:17 PM, Àé°Ê <nameliba在gmail.com> wrote:
> > > > > ÎÒУ¿ªÕ¹ÁË¢ñ¡¢¢ò¡¢¢óÈýÃÅÑ¡Ð޿Σ¬Ä³°àÓÐ50ÈË,Ñ¡ÐÞ¢ñµÄÓÐ38ÈË¡¢
> > > > > Ñ¡ÐÞ¢òµÄÓÐ35ÈË£¬Ñ¡ÐÞ¢óµÄÓÐ31ÈË£¬¼æÑ¡¢ñ¡¢¢òÕâÁ½Ãſγ̵ÄÓÐ29ÈË£¬
> > > > > ¼æÑ¡¢ñ¡¢¢óÕâÁ½Ãſγ̵ÄÓÐ28ÈË£¬¼æÑ¡¢ò¡¢¢óÕâ2Ãſγ̵ÄÓÐ26ÈË£¬
> > > > > ÈýÃŶ¼Ñ¡ÐÞÁ˵ÄÓÐ24ÈË£¬ÎÊ£º´Ë°àÈýÃŶ¼Î´Ñ¡ÐÞµÄÓжàÉÙÈË£¿
> > > > >
> > > > > ÓÃpythonд³öËã·¨
> > > >
> > > > Õ⻹ҪʲôÓÃpythonдËã·¨Âð£¿
> > > > AUBUC = A+B+C-AB-AC-BC+ABC = 38 + 35 + 31 - 29 - 28 - 26 + 24 = 45
> > > > ËùÒÔ£¬ÈýÃŶ¼Î´Ñ¡µÄÓ¦¸Ã¾ÍÊÇ50-45=5ÈË°¡¡£
> > > >
> > > >
> > > > --
> > > > Best Regards,
> > > > Leo Jay
> > > > _______________________________________________
> > > > python-chinese
> > > > Post: send python-chinese在lists.python.cn
> > > > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > > > Unsubscribe: send unsubscribe to
> > python-chinese-request在lists.python.cn
> > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> > >
> > >
> > > _______________________________________________
> > > python-chinese
> > > Post: send python-chinese在lists.python.cn
> > > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > > Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> > >
> >
> >
> >
> >
> > --
> > Any complex technology which doesn't come with documentation must be the
> > best
> > available.
> >  _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071129/675d23dd/attachment-0001.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月29日 星期四 21:33

@@ askfor在gmail.com
星期四 十一月 29 21:33:52 HKT 2007

û¼Ç´íµÄ»°Ó¦¸ÃÊÇÀëÉ¢µÚÒ»ÕµÄÄÚÈÝ¡£¡£

On 11/29/07, eho eho <jiulang.eho在gmail.com> wrote:
>
> ¸ãЦ~~¹þ¹þ
>
> ÔÚ07-11-29£¬Frank Tian <plumpbird在gmail.com> дµÀ£º
> >
> > Сѧ°ÂÊýµÄµÄÌâ ÁùÄ꼶µÄʱºò¾­³£×ö¡£¡£¡£
> >
> > On Nov 29, 2007 2:50 PM, xxmplus <xxmplus在gmail.com> wrote:
> >
> > > ËäÈ»mailinglist²»ÄܹàË®£¬µ«ÎÒ»¹ÊÇÈ̲»×¡Òªµãµãµã¡£¡£¡£
> > >
> > > On Nov 29, 2007 4:44 PM, Àé°Ê <nameliba在gmail.com> wrote:
> > > > ºÇºÇ£®ÄãÄÔ×ÓÕæºÃʹ
> > > >
> > > >
> > > > ÔÚ07-11-29£¬Leo Jay < python.leojay在gmail.com> дµÀ£º
> > > > > On Nov 29, 2007 2:17 PM, Àé°Ê < nameliba在gmail.com> wrote:
> > > > > > ÎÒУ¿ªÕ¹ÁË¢ñ¡¢¢ò¡¢¢óÈýÃÅÑ¡Ð޿Σ¬Ä³°àÓÐ50ÈË,Ñ¡ÐÞ¢ñµÄÓÐ38ÈË¡¢
> > > > > > Ñ¡ÐÞ¢òµÄÓÐ35ÈË£¬Ñ¡ÐÞ¢óµÄÓÐ31ÈË£¬¼æÑ¡¢ñ¡¢¢òÕâÁ½Ãſγ̵ÄÓÐ29ÈË£¬
> > > > > > ¼æÑ¡¢ñ¡¢¢óÕâÁ½Ãſγ̵ÄÓÐ28ÈË£¬¼æÑ¡¢ò¡¢¢óÕâ2Ãſγ̵ÄÓÐ26ÈË£¬
> > > > > > ÈýÃŶ¼Ñ¡ÐÞÁ˵ÄÓÐ24ÈË£¬ÎÊ£º´Ë°àÈýÃŶ¼Î´Ñ¡ÐÞµÄÓжàÉÙÈË£¿
> > > > > >
> > > > > > ÓÃpythonд³öËã·¨
> > > > >
> > > > > Õ⻹ҪʲôÓÃpythonдËã·¨Âð£¿
> > > > > AUBUC = A+B+C-AB-AC-BC+ABC = 38 + 35 + 31 - 29 - 28 - 26 + 24 = 45
> > > > > ËùÒÔ£¬ÈýÃŶ¼Î´Ñ¡µÄÓ¦¸Ã¾ÍÊÇ50-45=5ÈË°¡¡£
> > > > >
> > > > >
> > > > > --
> > > > > Best Regards,
> > > > > Leo Jay
> > > > > _______________________________________________
> > > > > python-chinese
> > > > > Post: send python-chinese在lists.python.cn
> > > > > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > >
> > > > > Unsubscribe: send unsubscribe to
> > > python-chinese-request在lists.python.cn
> > > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> > > >
> > > >
> > > > _______________________________________________
> > > > python-chinese
> > > > Post: send python-chinese在lists.python.cn
> > > > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > > > Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> > > >
> > >
> > >
> > >
> > >
> > > --
> > > Any complex technology which doesn't come with documentation must be
> > > the best
> > > available.
> > >  _______________________________________________
> > > python-chinese
> > > Post: send python-chinese在lists.python.cn
> > > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > > Unsubscribe: send unsubscribe to
> > > python-chinese-request在lists.python.cn
> > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> > >
> >
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071129/d095f1d4/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号