2015年5月9日

杭电1018

摘要: 刚开始没有什么头绪 后来还是借鉴了大神的,用斯特林公式,看来数学底子也是很重要啊斯特林公式是 本题是让我们求长度 所以公式可以改成 t=log10(n!)=log10(sqrt(2*pi*n))+n*log10(n/e);#include#include# define pi 3.141592653... 阅读全文

posted @ 2015-05-09 23:31 〆奋斗吧—小青年 阅读(94) 评论(0) 推荐(0)

2015年5月5日

杭电1040

摘要: As Easy As A+BTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 44723Accepted Submission(s): 19105Pr... 阅读全文

posted @ 2015-05-05 16:32 〆奋斗吧—小青年 阅读(156) 评论(0) 推荐(0)

2015年4月29日

杭电1021

摘要: 好吧这题我承认我刚开始没发现要找规律 老是超时;Fibonacci AgainTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 42613Accept... 阅读全文

posted @ 2015-04-29 20:06 〆奋斗吧—小青年 阅读(152) 评论(0) 推荐(0)

杭电1019

摘要: Least Common MultipleTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 37254Accepted Submission(s): ... 阅读全文

posted @ 2015-04-29 19:40 〆奋斗吧—小青年 阅读(316) 评论(0) 推荐(0)

2015年4月20日

杭电1004

摘要: Let the Balloon RiseProblem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' fa... 阅读全文

posted @ 2015-04-20 20:55 〆奋斗吧—小青年 阅读(198) 评论(0) 推荐(0)

2015年4月19日

杭电2050

摘要: 折线分割平面Problem Description我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分成7部分,具体如下所示。Input输入数据的第一行是一个整数C,表示测试实例的个数,然后... 阅读全文

posted @ 2015-04-19 19:51 〆奋斗吧—小青年 阅读(117) 评论(0) 推荐(0)

杭电2031

摘要: 进制转换Problem Description输入一个十进制数N,将它转换成R进制数输出。Input输入数据包含多个测试实例,每个测试实例包含两个整数N(32位整数)和R(210)。Output为每个测试实例输出转换后的数,每个输出占一行。如果R大于10,则对应的数字规则参考16进制(比如,10用A... 阅读全文

posted @ 2015-04-19 15:58 〆奋斗吧—小青年 阅读(119) 评论(0) 推荐(0)

杭电2051

摘要: #includeint main(){ int n,s; int a[100],i,j; while(scanf("%d",&n)!=EOF) { i=0; while(n) { a[i]=n%2;//表示对2取... 阅读全文

posted @ 2015-04-19 01:14 〆奋斗吧—小青年 阅读(101) 评论(0) 推荐(0)

2015年4月18日

栈之括号匹配

摘要: #include#include#define MaxSize 100void ExpIsCorrect(char exp[],int n);typedef char DataType;typedef struct{ DataType stack[MaxSize]; int top;}S... 阅读全文

posted @ 2015-04-18 23:14 〆奋斗吧—小青年 阅读(109) 评论(0) 推荐(0)

栈之回文

摘要: #include#include#define MaxSize 100typedef char DataType;typedef struct{ DataType stack[MaxSize]; int top;}SeqStack;void StackInitiate(SeqStack ... 阅读全文

posted @ 2015-04-18 23:13 〆奋斗吧—小青年 阅读(111) 评论(0) 推荐(0)

导航