Solution 1866953

Submitted on 6 Jul 2019 by danteliujie
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
urlwrite('','SetSolutionScore.p'); rehash path; SetSolutionScore(42); if now>737000 x=uint16(yournumber()); if numel(x)~=1, x=x(1); end SetSolutionScore(x); problem=2825; lines=textread('yournumber.m','%s') id=str2num(regexp(lines{end},'\d+','match','once')); fprintf('Player id %d \n',id); html=webread(sprintf('',problem,x)); n=numel(regexpi(html,'solution \d+')); if n~=1, fprintf('Sorry, there are %d solutions with score=%d \n',n,x); n{1}=1; end %fails if the number of solutions with this score if not 1 html=webread(sprintf('',problem,id,x)); n=numel(regexpi(html,'solution \d+')); if n==1, fprintf('Sorry, the other solution with score=%d cannot be your own \n',x); n{1}=1; end %fails if the single solution with this score is your own fprintf('There were %d solutions with score=%d \n',n,x); else % admin rescoring x=uint16(yournumber()); if numel(x)~=1, x=x(1); end SetSolutionScore(x); end

y = 18 lines = 13×1 cell array {'function' } {'y' } {'=' } {'yournumber()'} {'y' } {'=18' } {'end' } {'%This' } {'code' } {'written' } {'by' } {'profile_id' } {'11954238' } Player id 11954238 There were 0 solutions with score=18