摘要: There are n cities and n - 1 roads in the Seven Kingdoms, each road connects two cities and we can reach any city from any other by the roads. Theon a 阅读全文
posted @ 2017-08-13 11:18 starry_sky 阅读(341) 评论(0) 推荐(0)
摘要: 小C的倍数问题 Problem Description 根据小学数学的知识,我们知道一个正整数x是3的倍数的条件是x每一位加起来的和是3的倍数。反之,如果一个数每一位加起来是3的倍数,则这个数肯定是3的倍数。现在给定进制P,求有多少个B满足P进制下,一个正整数是B的倍数的充分必要条件是每一位加起来的 阅读全文
posted @ 2017-08-13 09:20 starry_sky 阅读(739) 评论(0) 推荐(0)