摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1017Problem DescriptionGiven two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b < n and (a^2+b^2 +m)/(ab) is an integer.This problem contains multiple test cases!The first line of a multiple input is an integer 阅读全文
posted @ 2011-08-04 15:20 淡墨æ末央 阅读(607) 评论(0) 推荐(0) 编辑
摘要: 链接:http://oj.innlab.net/JudgeOnline/problem.php?id=1504DescriptionJesse是个数学迷,他最喜欢研究“哥德巴赫猜想”,因此他的计算机密码也都采用素数。 但一直用同一个密码是不安全的,所以他要经常更换他的密码。但他只允许自己的密码中出现某些数字,且密码的每一位都不相同。比如1 2 4,则有6种情况124 142 214 241 412 421。其中241 和 421为素数。为了获得他的密码(他的机器上存放了第4届舜禹杯大学生程序设计竞赛的题目!),需要生成一个字典来帮助我们破解。 请你来编写一个程序帮助我们(因为众所周知的原因我们 阅读全文
posted @ 2011-08-04 14:33 淡墨æ末央 阅读(506) 评论(0) 推荐(0) 编辑