• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






Quentin Yo

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

随笔分类 -  ACM

 
ACM.Self Numbers
摘要:DescriptionIn 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define d(n) to be n plus the sum of the digits of n. (The d stands for digitadition, a term coined by Kaprekar.) For example, d(75) = 75 + 7 + 5 = 87. Given any po 阅读全文
posted @ 2013-04-04 16:16 QuentinYo 阅读(211) 评论(0) 推荐(0)
ACM.DNA Sorting
摘要:One measure of "unsortedness" in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequence "DAABEC", this measure is 5, since D is greater than four letters to its right and E is greater than one letter to 阅读全文
posted @ 2013-04-01 21:23 QuentinYo 阅读(286) 评论(0) 推荐(0)
ACM. Digital Roots
摘要:BackgroundThe digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting value contains two or more digits, those digits are summed and the process is repeated. This is continued as 阅读全文
posted @ 2013-03-31 17:43 QuentinYo 阅读(341) 评论(0) 推荐(0)
ACM.Ones
摘要:Given any integer 0 ≤ n ≤ 10000 not divisible by 2 or 5, some multiple of n is a number which in decimal notation is a sequence of 1's. How many digits are in the smallest such a multiple of n?Sample Input379901Output for Sample Input3612code 1 #include 2 3 using namespace std; 4 5 int main() 6 阅读全文
posted @ 2013-03-31 17:02 QuentinYo 阅读(249) 评论(0) 推荐(0)