ZOJ 2679 Old Bill(数学)】的更多相关文章

2679:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1679 2952:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1951 ZOJ:2679先来~ 水题大意:(题目大意:我什么时候改名了哇T T) 给你一个5位数的中间三个字母,还有一个数N让你求能被N整除的最大的五位数. 思路: 直接暴力枚举.... #include<cstdio> int…
主题链接:problemCode=2679" target="_blank">http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2679 Among grandfather��s papers a bill was found: 72 turkeys $_679_ The first and the last digits of the number that obviously represent…
Old Bill Time Limit: 2 Seconds      Memory Limit: 65536 KB Among grandfather��s papers a bill was found: 72 turkeys $_679_ The first and the last digits of the number that obviously represented the total price of those turkeys are replaced here by bl…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=494 题目大意: 一只蜗牛要从爬上n英寸高的地方,他速度为u每分钟,他爬完u需要休息1分钟,且他休息时下滑d英寸,问他什么时候爬出去. 吐槽: 小学的数学题编程了编程题,简直丧心病狂. 思路: 数据量小直接模拟即可. 也可以用数学推导 模拟板: #include<cstdio> int main() { int n,u,d; while(~scanf("%d%d%d…
GCD Expectation Time Limit: 4 Seconds                                     Memory Limit: 262144 KB                             Edward has a set of n integers {a1, a2,...,an}. He randomly picks a nonempty subset {x1, x2,…,xm} (each nonempty subset has…
Ant Time Limit: 1 Second      Memory Limit: 32768 KB There is an ant named Alice. Alice likes going hiking very much. Today, she wants to climb a cuboid. The length of cuboid's longest edge is n, and the other edges are all positive integers. Alice's…
公式推导题,G(0) = 1,G(1) = t,给出一个 i 和 G(i),要求求出G(j)的值: G(0) = 0*t + 1 G(1) = 1*t + 0; 观察t的系数和常数值可以知道二者都遵循斐波那契的规律,设系数值为Y(n),常数值为X(n); G(2) = 1*t + 1; Y(0) = 0,Y(1) = 1; G(3) = 2*t + 1; X(0) = 1, X(1) = 0; G(4) = 3*t + 2; 这样就能求出答案了,最后的t满足要求就有解 G(5) = 5*t +…
Big Number Time Limit: 10 Seconds      Memory Limit: 32768 KB In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are given a n…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1796 题意: 四个人玩游戏,已知三个人的输赢情况,求第四个人的输赢情况. 思路: 设第一个人赢的次数为x输的次数为y 则 x+a1+a2+a3=y+b1+b2+b3 x+y=a1+b1 所以 x=(2*b1+b2+b3-a2-a3)/2 y=a1+b1-x #include<iostream> #include<cstdio> using namespace…
杨宗纬的歌"这一路走来" 还蛮好听的,这首歌静静的躺在我的音乐盒某个阴暗的角落里,今天随机播放才发现的,哈哈. 数学一直是硬伤...... ------------------------------------------------数学硬伤的分割线------------------------------------------------ ZOJ:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=910 POJ…