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

Re:平衡三进制

Posted by jimmyxmupku at 2010-08-10 19:35:22 on Problem 1702
In Reply To:平衡三进制 Posted by:200730690105 at 2009-01-16 19:30:37
> 将n用-1,0,1表示,如20=1*3^3+(-1)*3^2+1*3^1+(-1)*3^0
> 所以20+3^0+3^2=3^1+3^3
> 即1,9 3,27
> 
> 平衡三进制具体转化方法
> 先转化为用0,1,2表示的3进制,然后通过“借位”转换
> 若对应的系数为2,则变为-1,下一位+1
> 若对应的系数为3,则变为0,下一位+1
> 为0或1时不变
膜拜

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