Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

喵的,看到数字根本想果断水过,但是1WA,原来求和再取模就可以了

Posted by lzq08ms at 2011-06-04 16:25:24 on Problem 1519 and last updated at 2011-06-04 16:37:48
不要高精度也可以,字符串记录之后求和,对9取模,任何数字+9以后其数字根不会变的,所以对于一个数,加上9的n倍之后它的数字根还是原来的值。故对9取模就可以,而当模为0是就是9

说到这里推荐大家玩一个游戏,《极限脱出 9小时9个人9扇门》,里面有一些关于数字根的有趣谜题

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator