TOPIC

Why my program is 100% wrong?

golam kibria asked 1 month ago

string = input() string1 = "" string2 = "" m = 1 for i in string: if ord(i) ==32 : break

string1+=i
m+=1

while m < len(string): string2+= string[m] m+=1

if (string1 and string2 )== "0": print("") else: string_final = "" for element in string2: if string1 != element and element != "0": string_final+=element

if string_final == "":
    string_final = "0"

print(string_final)                

Remember not post solutions. Your post may be reviewed by our moderators.

  • Ashraful Islam Emon replied 1 week ago

    include include

    int main() { int i,j,k,l; char a[10]; char b[1000]; while(scanf("%s%s",a,b)){ if(a[0]=='0'&& b[0]=='0') return 0; j=strlen(b); k=0; l=0; for(i=0;i<j;i++){ if(a[0]!=b[i]){ if(b[i]!='0') k=1; if(k==1){ l=1; printf("%c",b[i]); } } } if(l==0) printf("0"); printf("\n"); } return 0; }