设为首页 加入收藏

TOP

C解两道题
2014-11-23 22:08:23 来源: 作者: 【 】 浏览:1
Tags:解两道

1.If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120. click

{20,48,52}, {24,45,51}, {30,40,50}

For which value of p <=1000, is the number of solutions maximised

翻译过来就是:

如果p是这样一个数,满足三元组{a,b,c}之和是p,且a,b,c能组成直角三角形的三个边。当p=120的时候,且有三个解:

{20,48,52}, {24,45,51}, {30,40,50}

那么在p<=1000以内,满足以上条件的解的个数最多的p是几?

答案:840.

{ code placeholder}

2.A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we call it lexicographic order. The lexicographic permutations of 0, 1 and 2 are:

012 021 102 120 201 210

What is the millionth lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 click

翻译:A permutation is an ordered arrangement of objects。(大意就是排列的定义)比如,3124是数字1,2,3,4的一种可能排列。如果把所有的排列按照数字或者字母列出来,我们称为字典顺序。数字0,1,2的字典排序为:

012 021 102 120 201 210

那么数字0,1,2,3,4,5,6,7,8,9的字典排序的第1000000(100万)个排列数字是几?

答案:2783915460{ code placeholder}

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Poj 1639 K度限最小生成树 下一篇#pragma once和ifndef使用异同

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: