Problem44
来源:互联网 发布:java多线程同步是什么 编辑:程序博客网 时间:2024/06/03 18:58
原题:
Pentagonal numbers are generated by the formula, Pn=n(3n-1)/2.
The first ten pentagonal numbers are:
1, 5, 12, 22, 35, 51, 70, 92, 117, 145, ...
It can be seen that P4 + P7 = 22 + 70 = 92 = P8.
However, their difference, 70-22 = 48, is not pentagonal.
Find the pair of pentagonal numbers, Pj and Pk,
for which their sum and difference is pentagonal and D = |Pk-Pj| is minimised;
what is the value of D?
代码如下:
- Problem44
- C#调用VC DLL接口函数参数类型转换方法介绍
- Android中文翻译组——Android中文API合集  -  棒槌网@Android开发论坛 - Powered by phpwind
- 算法百题008:Bash Game(又名取石子游戏)
- Excle 2003 颜色 编号
- 将String转换为ascii码
- Problem44
- .net 在datagrid空间中遍历复选框
- 无法嵌入互操作类型“jmail.POP3Class”。请改用适用的接口。
- iPhone SDK Demo - CF Socket 简介和基于Socket+Http打造自己的浏览器Demo
- MYSQL的性能监视工具
- Problem45
- 深入探索透视投影变换
- 带进位的循环左移RCL
- OpenCores学习(0) --概述