CY_

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年9月13日

摘要: 母牛的故事Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33371Accepted Submission(s): 16459Problem Description有一头母牛,它每年年初生一头小母牛。每头小母牛从第四个年头开始,每年年初也生一头小母牛。请编程实现在第n年的时候,共有多少头母牛?Input输入数据由多个测试实例组成,每个测试实例占一行,包括一个整数n(0using namespace std;int a[60] = {0};voi 阅读全文
posted @ 2013-09-13 20:50 CY_ 阅读(157) 评论(0) 推荐(0) 编辑

摘要: u Calculate eProblem DescriptionA simple mathematical formula for e iswhere n is allowed to go to infinity. This can actually yield very accurate approximations of e using relatively small values of n.OutputOutput the approximations of e generated by the above formula for the values of n from 0 to 9 阅读全文
posted @ 2013-09-13 20:06 CY_ 阅读(128) 评论(0) 推荐(0) 编辑