|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Saturday, May 11, 2013 8:17 AM
Points: 460,
Visits: 2,521
|
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Friday, March 08, 2013 10:27 AM
Points: 771,
Visits: 211
|
|
Not able to reach the site with the link provided the Site. The answer could be
;WITH CTE AS ( SELECT SEQ, BINARYVALUE, 0 AS EXPO, CONVERT(NVARCHAR(4000),RIGHT(BINARYVALUE,1)) REMAINING , CONVERT(NVARCHAR(4000),LEFT(BINARYVALUE,LEN(BINARYVALUE) - 1)) DEDUCTIBLE FROM TC51 UNION ALL SELECT SEQ, BINARYVALUE, EXPO + 1, CONVERT(NVARCHAR(4000),RIGHT(DEDUCTIBLE,1)) ,CONVERT(NVARCHAR(4000),LEFT(DEDUCTIBLE,LEN(DEDUCTIBLE) - CASE WHEN LEN(DEDUCTIBLE) > 0 THEN 1 ELSE 0 END )) DEDUCTIBLE FROM CTE WHERE LEN(DEDUCTIBLE) > 0 )
sELECT SUM(remaining * power(CONVERT(NUMERIC(18,0),2),expo)),seq, binaryvalue FROM CTE group by seq, binaryvalue order by seq, binaryvalue
If there is any better method, please let me know how can I view it?
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Saturday, May 11, 2013 8:17 AM
Points: 460,
Visits: 2,521
|
|
Most people submit their solutions in the first two weeks after the challenge is published. The evaluation then might take another 2-4 weeks to complete. The solutions will be available publicly after the evaluation is completed.
I would encourage you to go to http://beyondrelational.com/puzzles/sqlserver/tsql/51/submit.aspx and submit your solution.
.
|
|
|
|