摘要: Checker ChallengeExamine the 6x6 checkerboard below and note that the six checkers are arranged on the board so that one and only one is placed in each row and each column, and there is never more than one in any diagonal. (Diagonals run from southeast to northwest and southwest to northeast and inc 阅读全文
posted @ 2012-08-13 19:03 剑不飞 阅读(327) 评论(0) 推荐(0) 编辑
摘要: Superprime RibButchering Farmer John's cows always yields the best prime rib. You can tell prime ribs by looking at the digits lovingly stamped across them, one by one, by FJ and the USDA. Farmer John ensures that a purchaser of his prime ribs gets really prime ribs because when sliced from the 阅读全文
posted @ 2012-08-13 14:24 剑不飞 阅读(379) 评论(0) 推荐(0) 编辑
摘要: Prime PalindromesThe number 151 is a prime palindrome because it is both a prime number and a palindrome (it is the same number when read forward as backward). Write a program that finds all prime palindromes in the range of two supplied numbers a and b (5 #include int f[7]={-1,-1,-1,5,-1,-1,-1};//. 阅读全文
posted @ 2012-08-13 11:45 剑不飞 阅读(208) 评论(0) 推荐(0) 编辑