- 博客(229)
- 收藏
- 关注
原创 Ten Digit Powers
With helps of many friends, the Ten Digit Powers sequence has been updated to n=128. More details,see Ten digit numbers Millions thanks to 无心人,mathe and gxqcn. The sequence was showed as
2009-01-13 21:45:00 1038
原创 Smallest Ten Digit Powers
This is a companion piece of Largest Ten Digit Powers . The codes are almostly same,with a few changes only. Function befit(ByVal s As String, ByVal num As Long) As Boolean tell if a string
2009-01-11 22:41:00 1257
原创 nth prime number contain n as their substring within 100000000
A small VBA code to get these numbers: Sub Main() Dim i&, j&, k&, n&, num&, a(100000000) As Byte, p(1 To 10000000) As Long num = 1 p(num) = 2 The 1st prime n = 10
2009-01-11 21:27:00 990
原创 Largest Ten Digit Powers
The idea was Inspirated from the following link: Homogeneous Square Numbers (Provided by mathe, http://bbs.emath.ac.cn/thread-78-1-1.html) Look at the 10-digit number 9876543210,its the large
2009-01-11 15:39:00 1950
转载 The Number of Triangles Formed by Intersecting Diagonals of a Regular Polygon
Reproduced from http://www.cs.uwaterloo.ca/journals/JIS/sommars/newtriangle.html Journal of Integer Sequences, Vol. 1 (1998), Article 98.1.5The Number of Triangles Fo
2009-01-09 19:02:00 9294
原创 VB获得迅雷资讯弹出网页的源代码
迅雷资讯弹出网页采用UTF-8编码,需要编制自定义函数对XMLHTTP对象获得的源代码进行转换:Private Declare Function MultiByteToWideChar Lib "kernel32" (ByVal CodePage As Long, ByVal dwFlags As Long, ByVal lpMultiByteStr As Long, ByVal cc
2009-01-04 23:11:00 2912
原创 Google Treasure Hunt 2008---Find the Smallest Prime Number
Question: Find the smallest number that can be expressed as the sum of 3 consecutive prime numbers, the sum of 11 consecutive prime numbers, the sum of 25 consecutive prime numbers, the sum of 171 con
2009-01-03 12:27:00 1046
转载 List of Hello World Programs in 200 Programming Languages
List of Hello World Programs in 200 Programming Languages by Scriptol.org(http://www.scriptol.org/hello-world-programming-language.php) A complete collection of the smallest possible programs, i
2009-01-02 23:16:00 2815
原创 Google Treasure Hunt 2008--Robot Problem
QuestionA robot is located at the top-left corner of a 65 x 45 grid (marked Start in the diagram below).The robot can only move either down or right at any point in time. The robot is tryin
2009-01-01 12:46:00 1018
原创 About Google Treasure Hunt 2008
今天比较高兴,一口气做完了四道题目。看来VB6 仍有用武之地,尽管速度着实令人失望。 Thank you for entering the Treasure Hunt! Here are the first correct entries we received for the email address northwolves@gmail.com: Questi
2008-12-30 15:37:00 969
原创 An UDF to Get LanguageSettings of Office's Application
Use Application.LanguageSettings.LanguageID to to get LanguageSettings of Offices Application The codes:Sub ShowLanguage() Dim Lan(-100 To 25000) As String Init Lan Deb
2008-12-29 00:31:00 1424
原创 Get prime numbers nearby a number less than 10^10
For any given number less than 10^10,you can get prime numbers from 10000 numbers nearby it by the following codes: Private Sub Command1_Click()Debug.Print primes10000(987654321)End Sub
2008-12-28 20:32:00 1138
转载 C++ 实现"1234567"的全排列
原帖地址(http://starlancer.org/~is2004/mini/test/read.cgi/gen/1085476446/)方法1:#include char c[9];int x,j,k;int main(int i){for(i=35280;i--;)if(j=i%7,c[j+1]=j+49,!j){for(x=7,j=720;x-1;j
2008-12-24 16:05:00 1760
原创 使用动态规划解决有关数字组合的问题
题目:在SHEET2中列出SHEET1表中重量不超过170,体积不超过200的所有组合(http://club.excelhome.net/viewthread.php?tid=382466&page=1#pid2435030) Sheet1 序号重量体积1253022631327324
2008-12-20 13:43:00 1840 2
原创 Get the Degree of Angle Between Hour and Minute Hand of a Clock at Anytime
We need to calculate Degree of angle between hour and minute hand Sometimes.So I wrote a function to solve it: Function Hourhandminute(ByVal mytime As Date) As StringDim t As Single, h As
2008-12-14 00:21:00 1116
原创 Draw an egg(3)
Use 4 arcs to compose an egg shape:Private Sub Form_Click()Me.Caption = "Draw an egg"Dim pi As Single, X As Singlepi = 4 * Atn(1)Me.Scale (-2, -4)-(4, 4)Me.Circle (2, 0), 1, vbCyan, 3
2008-12-12 01:00:00 917
原创 Draw an egg(2)
Its also easy to draw an egg with the curve y^2=(sin(x)*(1+cos(x)/π)). Private Sub Form_Click()Me.Caption = "Draw an egg"Dim pi As Single, X As Singlepi = 4 * Atn(1)Me.Scale (-1, -2)-
2008-12-12 00:23:00 941
原创 Draw an egg
Its very easy to draw an egg with the curve y^2=(x^2-1)*(x-π)Private Sub Form_Click()Me.Caption = "Draw an egg"Dim X As DoubleMe.Scale (-1.5, -3)-(1.5, 3)For X = -1 To 1 Step 0.0005Me
2008-12-11 23:54:00 1062
原创 动态规划一例
题目(http://topic.csdn.net/u/20081208/16/672693a2-ce8e-462a-ba07-a70ff2f0c5a2.html?seed=2109433475):有一个蛋糕,被切成了100份,现将这个100份装到12个盘子中,要求每个盘子中的份数不能为0,并且份数中必须还有数字3,不论个位或者十位,例如13份,37份等。 请给出每个盘子中各装多少份的所有答案。
2008-12-08 22:45:00 2548
原创 How Rich Are You in the World?
HOW RICH ARE YOU? Use the codes below ,you can find where you sit in the richest people list in world. Sub Showhowrichyouare()Getit InputBox("Please enter
2008-12-08 20:18:00 1601
原创 Erf
ERF 返回误差函数在上下限之间的积分。如果该函数不可用,并返回错误值 #NAME?,请安装并加载“分析工具库”加载宏。 在“工具”菜单上,单击“加载宏”。 在“可用加载宏”列表中,选中“分析工具库”框,再单击“确定”。 如果必要,请遵循安装程序中的指示。 语法ERF(lower_limit,up
2008-12-08 14:27:00 1436
原创 vb分割三角形
题目要求:分割三角形的方法是从一个大的等边三角形开始,将其三边的中点进行连线,分成相同的四个三角形,除中间外的三个三角形再重复上述过程,直到满足给定条件的层次数为止.(原贴地址: http://topic.csdn.net/u/20081126/19/ea2362d5-613a-464d-8567-0ac64ca858a2.html) 模块代码:Type point
2008-11-27 09:32:00 1171
原创 一个九位数由1-9数字组成并前N 位被N整除
题目:请将123456789九个数字以特定的顺序排列,组成一个9位数ABCDEFGHI(每个数字只能使用一次),使得:1.第一位数字组成的整数可以被1整除2.第一、二位数字组成的整数可以被2整除3.第一、二、三位数字组成的整数可以被3整除4.第一、二、三、四位数字组成的整数可以被4整除......9.第一、二、三...九位数字组成的整数可以被9整除 分析:通常想法是遍历9!=
2008-11-26 19:13:00 8595 1
原创 一道趣味算术题
题目地址:http://club.excelhome.net/thread-175411-1-1.html 先看几个数:312132,231213,41312432,23421314 可以看到以上字串有以下特点: 2个1 之间有1个数,2个2 之间有2个数,2个3之间有3个数... 试找出由(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,
2008-11-26 10:31:00 31916 41
原创 随机排列n*n方阵
将n组1-n随机置于n*n的单元格中,使得每行,每列都是1-n的一个全排列 Sub Perm()Dim n As Long, i As Long, j As Long, arr(), brr(), t As Longn = 20ReDim arr(n - 1, n - 1)ReDim brr(n - 1)For i = 0 To n ^ 2 - 1arr(i
2008-11-25 21:51:00 5228 2
原创 Multi select elements which sums upto a certain number from an array
Give an array and a certain number,how to select some of the elements to sums upto the number?The following codes can bring you one or more solutions out:Sub Solve(ByVal Total As Double, B
2008-11-25 19:37:00 1768
原创 The four number game
The Four Numbers Game is a mathematical game, as taught by Dr. Paul Sally, Prof. of Mathematics at the University of Chicago. To play this game, draw a square and put a number at each corner, thus: 5_
2008-11-24 20:27:00 834
转载 Which Numbers are the Sum of Two Squares?
The main goal of todays lecture is to prove the following theorem. Theorem 1.1 A number is a sum of two squares if and only if all prime factors of of the form have even exponent in the prim
2008-11-24 19:50:00 1165
原创 分解质因数一例
100!+1=93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000001=101*14303*149239*35043
2008-11-23 15:01:00 1030 2
原创 前n个自然数的阶乘之和(单数,双数,全部)
电脑上翻出老代码,好几年前写的,尽管效率比较低,也可一用.Sub calc(ByVal n As Long, Optional types As String = "全部", Optional ByRef factorial As String, Optional ByRef sumfactorial As String)Dim numlen As Long, last As Lo
2008-11-21 20:08:00 2306
原创 一句代码计算阶乘(python)
print reduce(lambda a,b : a*b, range(1,1001))Reurns: 40238726007709377354370243392300398571937486421071463254379991042993851239862902059204420848696940480047998861019719605863166687299480855
2008-11-12 23:16:00 3533
原创 递归实现数字的组合(C++)
递归实现数字的组合 #include void Combin(int m,int n,int a){ if(m == n){ if(a>0)printf("%d",a); while(n > 0) printf("%d",n--); printf("/n"); return;
2008-11-10 23:47:00 1907 1
转载 Every positive integer is a sum of four integer squares
From(http://www.alpertron.com.ar/4SQUARES.HTM)Every positive integer is a sum of four integer squaresby Michael Barr IntroductionThe theorem of the title has been known for centuries, perh
2008-11-01 23:47:00 2464
转载 Lagrange's four-square theorem
Lagranges four-square theorem(http://en.wikipedia.org/wiki/Lagrange%27s_four-square_theorem)Lagranges four-square theorem, also known as Bachets conjecture, was proven in 1770 by Joseph Louis
2008-11-01 22:56:00 1449
翻译 Export selection of word document as an image file(2)
Option ExplicitPrivate Declare Function EmptyClipboard Lib "user32" () As LongPrivate Declare Function OpenClipboard Lib "user32" _ (ByVal hwnd As Long) As LongPrivate Declare Fun
2008-10-25 15:53:00 1727
转载 Export selection of word document as an image file
原文地址:http://www.spotlight-wissen.de/archiv/message/1665077.htmlOption Explicit (c) Désirée und Wolfram, 3/2005 Modifiziert: 11/2007 - Bilder mit runden Ecken versehen Bilder aus Winword im
2008-10-25 15:43:00 1906
原创 递归列举从数组b()中选出某些元素(允许重复)使其和等于num的所有组合
Dim mycount As Long, s(1 To 65536, 1 To 1), num As LongSub main()Dim a, bnum = 45b = Array(10, 9, 8, 7, 6, 5, 4, 3, 2, 1)ReDim a(num)a(0) = b(0)search num, 0, 0, a, b[a1].Resize(65
2008-10-24 19:37:00 1276
原创 双色球中奖查询程序
Sub Chaxun()Const mycaipiao = "01 03 05 07 09 15 29 24 27 33+02 07 09 13 16"jisuan "08119", mycaipiaoEnd SubSub jiangjin(a, b, c, d, j1, j2, result As String)Dim x(6), i As Longs = Split("投注金额 一等奖
2008-10-10 11:11:00 7023 1
转载 吃动物的植物
吃人树----奠柏 生长在印度尼西亚爪哇岛上的奠柏,居然能“吃”人。 奠柏树高八九米,长着很多长长的枝条,垂贴地面。有的像快断的电线,风吹摇晃,如果有人不小心碰到它们,树上所有的枝条就像魔爪似地向同一个方向伸了过来,把人卷住,而且越缠越紧,使人脱不了身。树枝很快就会分泌出一种粘性很强的胶汁,能消化被捕获的“食物”,动物粘着了这种液体,就慢慢被“消化”掉,成为树的美餐。当奠柏的枝条吸完了养料,又展开
2008-09-22 22:10:00 1475 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人