Cody

Satadru Mukherjee

1227
Rank
2
Badges
860
Score
51 – 97 of 97

Satadru Mukherjee received Commenter badge for Problem 74. Balanced number

on 25 Jun 2019

Satadru Mukherjee submitted a Comment to Problem 74. Balanced number

Simple code: clc clear all close all x=input('Enter the number'); Y=[]; c=0; m=x; while (m>0) b=rem(m,10); Y=[b Y]; c=c+1; m=(m-b)/10; end r=c/2; qw=floor(r); if(qw==r) t=0; l=0; for i=1:qw t=t+Y(i); end for i=(qw+1):c l=l+Y(i); end if(t==l) disp('Yes'); else disp('No'); end else t=0; l=0; for i=1:qw t=t+Y(i); end for i=(qw+2):c l=l+Y(i); end if(t==l) disp('Yes'); else disp('No'); end end All test cases of CODY , will be passed :-)

on 25 Jun 2019

Satadru Mukherjee received Solver badge for Solution 1857256

on 25 Jun 2019

51 – 97 of 97