Diagnostic Test 2016 Level 2

Problem 3: Remove cancer

Recently, Polska has noticed that some depictions of him are heretical. A correct depiction of him only consists of '0's and '1's.

Help him remove the cancer with his plunger, by replacing any non-canonical characters with '0's.

Input Format

The first line of input consists of a single integer: the number of lines that will follow. Subsequent lines of input depict Polska.

Output Format

Output Polska's depiction after cancer removal.

Sample Input

7
1111111111
1111991111
1101111011
10007q0001
1101111011
11110o1111
1111111111

Sample Output

1111111111
1111001111
1101111011
1000000001
1101111011
1111001111
1111111111

All Submissions
Best Solutions


Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 13, 2016
Author: Cynthia

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

it works perfectly on my computer, but it gives me WA in the test case (only first 2)
why??????????
help me

Please see this comment.

My code works on windows cmd but not here?

This problem is using Windows line endings. I apologise for the inconvenience.

In the future, please try using raw_input().strip(). If adding strip() makes it work, then please leave a note in the comments and we'll try to fix it ASAP.

Still not fixed. This is a serious issue and really annoying, especially when doing byte-level manipulations. I get a WA with no indication at all as to what is wrong, and I can only consider myself fortunate that I saw the comment before I started debugging.