| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 12744 人关注过本帖
标题:PK赛第一期[N!连加][级别:中级](考虑期末考试,延期至7月21日结束)
取消只看楼主 加入收藏
Joforn
Rank: 6Rank: 6
等 级:贵宾
威 望:23
帖 子:1242
专家分:122
注 册:2007-1-2
收藏
 问题点数:0 回复次数:43 
PK赛第一期[N!连加][级别:中级](考虑期末考试,延期至7月21日结束)

PK赛第1期(2007.6.18)

期号:001
题目:N!连加
级别:中级
组别:B

拓展级别:N>200

开赛时间:2007.06.18
结束时间:2007.07.21 20:00(考虑期末考试,延期至7月21日结束)

说明:
1、由于本期时间仓促,所以第一期的题目就没有等大家出题直接先出一个。
2、题目说明:求 (1!)+(2!)+3!+...+(N!)的值,1<=N<=200 即要求N可以为1到200之间的任意整数。要求输出使用常用
十进制带间隔符方式输出(如:100,000,020)。
3、要求在输入值在1~200之间时必须输出正确的值。
4、本期主要评分要点在于大家代码书写规范性、大数处理方法及代码效率上。要求不得使用任何第三方控件或是动态
链接库(DLL文件)。
5、参赛作品可以直接在本帖中跟帖上传压缩后的EXE文件(请在跟帖中说明用户ID、期号、组别、版本号)。参赛源码请
发送至Joforn1@163.com,由于本邮箱垃圾邮件较多,请务必标明主题如以下格式:论坛ID_期号_组别_版本
如(Joforn_001_B_1)
6、拓展级别部分不作要求,只是作为部分评分参考。


附:为了提高大家的信心,特附上示例:

DuUN4SoY.rar (9.66 KB) PK赛第一期[N!连加][级别:中级]




本示例源码将会在PK赛结束时与参赛作品源码一同放出。


附小广告一条:
新出奖励方法,具体奖励方法请参见本版面固顶帖:
http://bbs.bc-cn.net/viewthread.php?tid=148360&extra=&page=1#148360

如大家有更好意见或是建议可以在那里跟帖说明。我们会不断改进的,也希望得到大家的支持。



[此贴子已经被作者于2007-7-19 21:20:25编辑过]

搜索更多相关主题的帖子: 级别 考试 结束 STRONG 
2007-06-18 13:29
Joforn
Rank: 6Rank: 6
等 级:贵宾
威 望:23
帖 子:1242
专家分:122
注 册:2007-1-2
收藏
得分:0 
不要急,这期多留了一个星期的时间给大家,大家可以在网上找找相关的资料,或是在本帖交流交流经验。
这个题本身要求的编程技术都是一些基本的语法技巧。只要大家肯去想,一定会大有收获的。

VB QQ群:47715789
2007-06-18 20:07
Joforn
Rank: 6Rank: 6
等 级:贵宾
威 望:23
帖 子:1242
专家分:122
注 册:2007-1-2
收藏
得分:0 
以下是引用冰蓝寒星在2007-6-18 22:19:05的发言:
这个题。。。

?????


VB QQ群:47715789
2007-06-18 22:21
Joforn
Rank: 6Rank: 6
等 级:贵宾
威 望:23
帖 子:1242
专家分:122
注 册:2007-1-2
收藏
得分:0 

楼上的说对了,VB中的任何标准类型的变量都会溢出。
这个才是这个题的难点。如果只是N<5,这个题还用得出吗?
这个题型我想应该几乎每个人都做过,但我想可能绝大部分只是做出能算出1<N<10之间就满足了。
这个题本意就是让大家学会想题,当你做出10!的连加之后为什么就不会去想如果是N=100、N=1000时应该怎么处理呢?


VB QQ群:47715789
2007-06-19 08:33
Joforn
Rank: 6Rank: 6
等 级:贵宾
威 望:23
帖 子:1242
专家分:122
注 册:2007-1-2
收藏
得分:0 

由于做0的接1乘没什么意义,所以只要在1到200就行了。


VB QQ群:47715789
2007-06-19 10:06
Joforn
Rank: 6Rank: 6
等 级:贵宾
威 望:23
帖 子:1242
专家分:122
注 册:2007-1-2
收藏
得分:0 
以下是引用冰蓝寒星在2007-6-19 11:11:18的发言:
哦,谢谢BZ,我会努力的..

希望能早日见到你的成品。
哪天有时间我自己也做做。
一起努力吧,呵


VB QQ群:47715789
2007-06-19 11:38
Joforn
Rank: 6Rank: 6
等 级:贵宾
威 望:23
帖 子:1242
专家分:122
注 册:2007-1-2
收藏
得分:0 
以下是引用逍遥天龙在2007-6-19 11:38:51的发言:

感觉并不是很难啊,现在就差输出没有做了!
要回去看看C再说

所以我才把它定为中级啊。

bn


VB QQ群:47715789
2007-06-19 11:43
Joforn
Rank: 6Rank: 6
等 级:贵宾
威 望:23
帖 子:1242
专家分:122
注 册:2007-1-2
收藏
得分:0 
以下是引用逍遥天龙在2007-6-19 11:38:51的发言:

感觉并不是很难啊,现在就差输出没有做了!
要回去看看C再说

所以定级时才被定为中级。
不过还是很期待你的作品,也为大家多一点信心啊。


VB QQ群:47715789
2007-06-19 11:44
Joforn
Rank: 6Rank: 6
等 级:贵宾
威 望:23
帖 子:1242
专家分:122
注 册:2007-1-2
收藏
得分:0 

部分解对照表:
计算公式:1! + 2! + 3! + 4! + 5! +...+ 10!
计算结果:4,037,913
计算公式:1! + 2! + 3! + 4! + 5! +...+ 11!
计算结果:43,954,713
计算公式:1! + 2! + 3! + 4! + 5! +...+ 12!
计算结果:522,956,313
计算公式:1! + 2! + 3! + 4! + 5! +...+ 100!
计算结果:94,269,001,683,709,979,260,859,834,124,473,539,872,070,722,613,982,672,442,938,359,305,624,678,223,479,506,023,400,294,093,599,136,466,986,609,124,347,432,647,622,826,870,038,220,556,442,336,528,920,420,940,313
计算公式:1! + 2! + 3! + 4! + 5! +...+ 200!
计算结果:792,621,072,814,943,158,937,574,954,417,696,054,502,273,470,568,077,747,007,887,743,862,285,047,941,581,535,541,498,718,312,275,086,275,679,893,343,076,013,862,361,579,680,670,972,527,976,009,279,036,348,551,929,550,827,607,601,145,450,876,014,530,359,530,008,733,947,699,274,904,382,825,445,634,899,233,107,885,545,828,612,637,824,213,482,759,975,963,581,961,375,904,743,254,634,250,508,637,523,339,809,985,946,128,242,523,687,347,261,107,994,804,323,593,105,039,052,556,442,336,528,920,420,940,313

[此贴子已经被作者于2007-6-29 17:54:38编辑过]


VB QQ群:47715789
2007-06-19 20:11
Joforn
Rank: 6Rank: 6
等 级:贵宾
威 望:23
帖 子:1242
专家分:122
注 册:2007-1-2
收藏
得分:0 
计算公式:1! + 2! + 3! + 4! + 5! +...+ 1000!
开始时间:17:55:27
结束时间:17:55:28
总计耗时:0.313秒
结果位数:2568位(十进制)
计算结果:402,790,050,531,223,457,680,670,558,292,183,044,930,441,094,551,528,966,419,334,642,920,075,902,370,082,550,849,878,938,011,122,874,840,322,664,395,727,767,319,128,483,846,892,726,398,968,790,560,901,035,018,977,865,543,415,443,376,965,144,616,549,510,538,851,077,440,410,165,819,782,073,475,583,082,079,396,504,111,380,884,916,810,768,467,471,317,168,913,183,948,275,897,490,803,646,698,793,846,190,852,594,417,739,671,786,914,563,472,162,093,180,956,284,720,843,607,311,204,509,397,095,907,530,114,810,381,703,803,860,648,328,656,344,389,023,077,975,647,748,628,886,817,466,804,724,858,587,747,840,936,784,462,436,173,977,429,991,182,753,207,302,348,016,538,494,642,001,301,432,395,279,726,745,538,178,727,708,503,090,870,745,742,249,581,124,437,084,158,031,806,471,602,854,863,650,302,741,825,130,214,652,788,342,621,283,870,175,833,906,572,656,890,104,432,413,095,171,095,723,550,851,047,360,182,700,817,666,447,833,450,097,928,957,386,876,271,765,554,137,407,111,747,666,512,309,980,678,539,886,786,878,262,902,584,539,118,231,519,316,835,523,885,400,137,767,203,426,696,953,126,303,292,828,224,235,349,134,630,280,084,480,064,650,497,764,755,473,824,102,259,453,127,730,077,777,531,063,115,138,764,952,527,597,098,445,380,046,443,997,540,925,880,086,936,317,933,421,768,424,925,084,707,414,812,932,329,166,745,886,234,137,226,923,024,813,461,900,363,225,999,464,524,935,227,947,647,167,947,434,411,637,139,203,517,404,371,214,232,998,239,493,954,562,323,327,076,903,915,931,443,305,369,962,856,388,265,027,346,155,623,332,543,302,943,446,674,383,336,900,484,885,947,609,695,640,139,797,208,838,438,493,998,636,482,572,950,930,777,919,644,406,154,624,084,228,042,985,270,573,774,543,689,565,298,092,301,062,689,807,689,071,120,317,578,510,142,181,892,798,247,199,071,452,022,029,172,707,400,688,758,980,305,702,923,813,291,544,851,703,914,211,657,597,582,497,807,598,793,035,565,731,652,297,925,769,886,549,168,450,867,091,163,868,402,442,018,371,341,022,143,349,040,941,897,422,377,931,540,131,712,376,088,451,926,646,802,255,265,721,820,332,564,453,961,091,792,448,710,886,674,897,251,899,281,432,897,966,817,352,381,951,694,370,184,383,299,109,654,078,410,356,489,144,960,977,274,480,320,655,205,474,842,571,310,858,767,154,579,079,644,215,514,199,003,832,599,232,631,020,684,528,203,955,813,111,140,473,074,686,810,426,051,322,892,063,650,122,841,004,997,271,652,977,702,547,274,337,834,459,757,112,850,838,135,183,696,311,712,170,990,224,739,928,697,694,772,853,140,476,802,033,735,594,574,707,189,941,820,656,793,611,572,800,671,948,131,128,109,558,012,358,679,446,259,496,244,143,021,997,936,801,273,888,393,102,412,918,463,505,832,701,613,704,464,047,394,891,693,567,824,946,365,095,976,820,092,895,872,874,833,067,345,472,399,549,213,736,568,277,881,574,159,120,670,765,215,962,463,587,184,455,433,922,702,506,813,953,637,742,383,768,964,226,648,365,610,070,168,839,324,749,896,910,992,390,804,658,988,479,107,678,562,550,844,858,514,512,762,455,637,677,863,067,821,690,083,222,834,405,613,388,709,119,188,719,479,181,528,190,836,888,908,152,845,729,021,513,491,658,586,509,889,455,613,570,273,121,541,638,995,145,894,561,079,999,213,500,076,101,248,781,500,642,979,091,198,044,736,325,729,107,144,579,768,273,776,743,716,439,557,581,557,253,878,204,647,391,176,582,851,167,312,182,026,188,795,156,620,056,856,503,340,092,247,479,478,684,738,621,107,994,804,323,593,105,039,052,556,442,336,528,920,420,940,313

[此贴子已经被作者于2007-6-29 17:55:31编辑过]


VB QQ群:47715789
2007-06-19 20:12
快速回复:PK赛第一期[N!连加][级别:中级](考虑期末考试,延期至7月21日结束)
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.031563 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved