Search found 1 match

by ali1024
Sun Oct 30, 2011 7:53 pm
Forum: Volume 108 (10800-10899)
Topic: 10878 - Decode the tape
Replies: 23
Views: 20168

Re: 10878 - Decode the tape

pls help me !
why go to WA
i m check all state true but go to Wa
#include <stdio.h>
int pow2(int t){
int p=1;
while(t-->0)
p*=2;
return p;
}
char decode(char *str){
char ch,i;
for(i=9;i>6;i--)
if(*(str+i)=='o')
ch+=pow2(9-i);
for(i=5;i>1;i--)
if(*(str+i)=='o')
ch+=pow2(8-i);
return ch ...

Go to advanced search