The shortest problem】的更多相关文章

The shortest problem Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 969 Accepted Submission(s): 491 Problem Description In this problem, we should solve an interesting game. At first, we have an…
The shortest problem http://acm.hdu.edu.cn/showproblem.php?pid=5373 Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 181 Accepted Submission(s): 92 Problem Description In this problem, we should sol…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5373 The shortest problem Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 995    Accepted Submission(s): 498 Problem Description In this problem, w…
题目传送门 /* 题意:题目讲的很清楚:When n=123 and t=3 then we can get 123->1236->123612->12361215.要求t次操作后,能否被11整除 同余模定理:每次操作将后缀值加到上次操作的值%11后的后面,有点绕,纸上模拟一下就行了 */ /************************************************ * Author :Running_Time * Created Time :2015-8-12 8…
The shortest problem Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 346    Accepted Submission(s): 167 Problem Description In this problem, we should solve an interesting game. At first, we hav…
The shortest problem Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 0    Accepted Submission(s): 0 Problem Description In this problem, we should solve an interesting game. At first, we have an…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5373 一开始想到用整除11的性质去做,即奇位数的和和偶位数的和的差为11的倍数,但估不准数据范围没敢去做, 尝试去敲大数,HFZ想出了一个比较巧的方法,模拟计算的过程,用变量去存sum,sum = sum + 各位数字之和, 如果更新后的num是11的倍数,num就可以归0了,极大简化了过程,Int范围内就可以做.代码如下: #include<stdio.h> int get_sum(int x)…
http://acm.hdu.edu.cn/showproblem.php?pid=5373 YY题,模拟下计算过程就好了,计算中并不要保存实际数(这个数会非常大),只要保存到目前为止的数字位上的和 与 奇偶位上的差即可 #pragma comment(linker, "/STACK:1677721600") #include <map> #include <set> #include <stack> #include <queue> #…
链接: http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1005&cid=595 若一个整数的个位数字截去,再从余下的数中,减去个位数的2倍,如果差是7的倍数,则原数能被7整除.如果一次不容易看出,就需要继续上述过程.如6139,过程如下:613-9×2=595,59-5×2=49,所以6139是7的倍数. 能被11整除的数的特征把一个数由右边向左边数,将奇位上的数字与偶位上的数字分别加起来,再求它们的差,如果这个差是11的倍…
题意:给定两个数的n和m,有一种操作,把 n 的各位数字加起来放到 n后面形成一个新数n,问重复 m 次所得的数能否整除 11. 析:这个题首先要知道一个规律奇数位的和减去偶数位的和能被11整除的数字一定能被11整除.当然不知道这个题也可以过,直接模拟. 还有几个其他的规律; 被3整除:每位的和能被3整除即可: 被4整除:末尾两位能被4整除即可: 被7整除:将个位数字截去,在余下的数中减去个位数字的二倍,差是7的倍数即可:(可以递归) 被8整除:末尾三位能被8整除即可: 被9整除:每位的和能被9…