上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 31 下一页
摘要: 描述 我们都知道如何计算一个数的阶乘,可是,如果这个数很大呢,我们该如何去计算它并输出它?输入输入一个整数m(0using namespace std;int a[10000000];int main(){ int n,i,j,sum,t,b; cin>>n; a[0]=1; t=1;//数组长度 ... 阅读全文
posted @ 2014-11-27 20:24 NYNU_ACM 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 一般求幂算法运算量较大,假如求一个数X的n次幂,需要进行n次循环相乘,实则可以减少一半循环次数。现在令x=5,n=5 一般需要5次循环,每次x *= n ;如果使用快速求幂算法只需要3次循环,快速求幂即二分求幂,第一次n = 5 / 2 = 2 ; 第二次 n = 2 / 2 = 1 ; 第三次 n... 阅读全文
posted @ 2014-11-27 09:51 NYNU_ACM 阅读(264) 评论(0) 推荐(0) 编辑
摘要: DescriptionProblems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the na... 阅读全文
posted @ 2014-11-26 21:26 NYNU_ACM 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Problem A: 走迷宫问题Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 9 Solved: 3[Submit][Status][Web Board]Description给定一个二维数组 int map[5][5] = {0 , 1 , 0 , 0... 阅读全文
posted @ 2014-11-26 18:01 NYNU_ACM 阅读(356) 评论(0) 推荐(0) 编辑
摘要: Problem F: ExponentiationTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 4 Solved: 2[Submit][Status][Web Board] [Edit] [TestData]DescriptionProblems inv... 阅读全文
posted @ 2014-11-26 15:56 NYNU_ACM 阅读(185) 评论(0) 推荐(0) 编辑
摘要: DescriptionThe ProblemThe first project for the poor student was to make a calculator that can just perform the basic arithmetic operations.But like m... 阅读全文
posted @ 2014-11-25 21:26 NYNU_ACM 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Problem D: Integer InquiryTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 41 Solved: 12[Submit][Status][Web Board]DescriptionOne of the first users of B... 阅读全文
posted @ 2014-11-25 12:29 NYNU_ACM 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Problem E: ProductTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 18 Solved: 14[Submit][Status][Web Board]DescriptionThe problem is to multiply two inte... 阅读全文
posted @ 2014-11-25 12:25 NYNU_ACM 阅读(209) 评论(0) 推荐(0) 编辑
摘要: DescriptionThe problem is to multiply two integers X, Y. (0#includeusing namespace std;int main(){ char a[10000],b[10000]; int i,j,t1,c,t2; while(cin>... 阅读全文
posted @ 2014-11-25 11:32 NYNU_ACM 阅读(263) 评论(0) 推荐(0) 编辑
摘要: DescriptionOne of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he ex... 阅读全文
posted @ 2014-11-25 11:30 NYNU_ACM 阅读(229) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 31 下一页