
ACM算法——简单数学
文章平均质量分 64
朱户凌晨起-悠然见南山
我是个菜鸟
展开
-
hdu1717小数化分数2
Problem Description Ray 在数学课上听老师说,任何小数都能表示成分数的形式,他开始了化了起来,很快他就完成了,但他又想到一个问题,如何把一个循环小数化成分数呢? 请你写一个程序不但可以将普通小数化成最简分数,也可以把循环小数化成最简分数。 Input 第一行是一个整数N,表示有多少组数据。 每组数据只有一个纯小数,也就是整数部分为0。小数的原创 2016-07-25 14:26:16 · 497 阅读 · 0 评论 -
hdu1568 Fibonacci
Problem Description 2007年到来了。经过2006年一年的修炼,数学神童zouyu终于把0到100000000的Fibonacci数列 (f[0]=0,f[1]=1;f[i] = f[i-1]+f[i-2](i>=2))的值全部给背了下来。 接下来,CodeStar决定要考考他,于是每问他一个数字,他就要把答案说出来,不过有的数字太长了。所以规定超过4位的只要说出前4原创 2016-07-27 22:17:31 · 522 阅读 · 0 评论 -
hdu1443 Joseph
Problem Description The Joseph\\\\\\\'s problem is notoriously known. For those who are not familiar with the original problem: from among n people, numbered 1, 2, . . ., n, standing in circle ever原创 2016-07-31 15:17:03 · 352 阅读 · 0 评论 -
hdu 2674 N!Again(简单数学)
Problem Description WhereIsHeroFrom: Zty, what are you doing ? Zty: I want to calculate N!...... WhereIsHeroFrom: So easy! How big N is原创 2016-08-08 09:45:25 · 405 阅读 · 0 评论 -
hdu 1222 Wolf and Rabbit(扩展欧几里德)
There is a hill with n holes around. The holes are signed from 0 to n-1. A rabbit must hide in one of the holes. A wolf searches the rabbit in anticlockwise order. The first hole he get into原创 2016-08-08 11:38:14 · 538 阅读 · 0 评论