ITeye博客

lethorld的博客

lethorld · 共 5 篇文章

Biorhythms 需要数学推导

#include <stdio.h> #include <stdlib.h> double pi = 3.1415926535898; int main(int argc, char *argv[]) { int p, e, i, d; int k1, k2, k3; int days; int cnt = 1; while (true) { scanf("%d %d %d %d", &p, &e, &i, &d); if (p==-1 && e==-1 && i==-1 && d==-1) break; p = p % 23; e = e % 28; i = i % 33; k1 = k2…

2012-01-30T18:44:32Z · 编程语言 · 评论(0)

P1005 I Think I Need a Houseboat -- 水题

#include <stdio.h> #include <stdlib.h> double pi = 3.1415926535898; int main(int argc, char *argv[]) { int cnt, i; float x, y; int year; scanf("%d", &cnt); for (i=1; i<=cnt; i++) { scanf("%f %f", &x, &y); double temp = pi * (x*x + y*y) / 100.0; year = temp; year += (temp - year > 0.0) ? 1 : 0; prin…

2012-01-30T16:14:31Z · 编程语言 · 评论(0)

Hangover 这题很简单,当练练手了。

Hangover Description How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicular to the table.) With two cards you can make the top card overhang the bottom one by half a …

2012-01-29T10:25:48Z · 编程语言 · 评论(0)

Exponentiation 大实数乘法

Description Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems. This problem requires that you write a program to compute the exact value of Rn where …

2012-01-29T10:23:42Z · 编程语言 · 评论(0)

12306刷票软件,做IT的你我都应该抵制

因为个人原因,所以基本上每周六我都需要买动车/高铁票穿梭于两个城市间。所以12306从推出的第一天开始,我就注册成为它的用户了。 最开始,12306网站支持游客直接查询火车票信息,查到你满意的车次后再登陆下订单付款购票; 后来,每当我点上购票按钮的时候,我都会被华丽丽地重定向到登陆界面,登陆完成之后才能去查询车票信息; 再后来,我发现我必须在登陆界面上很傻瓜地刷上十几分钟后才能登上12306网站订票。 某一天,我赌气和我女朋友说:12306网站再这么挫没有改进的话,我就要写脚本刷了啊。 然后,前段时间,我女朋友给我发了链接,我打开一看看,一篇关于如何刷12306网站的帖子亮瞎了我的双眼…… …

2012-01-17T20:04:19Z · 非技术 · 评论(1)