Back
Close

Reverse exclusive, or not?

Statement

 Goal

Input:
8
01010010
00
010001010010
10
0
11
01
1

Output:
1
0
0
1
0
0
1
1
Input
Line 1: Positive integer nb

Next nb lines: Non empty string s containing only "0" and "1" characters
Output
nb lines: 0 or 1
Constraints
1 ≤ nb ≤ 100
1 ≤ length of each s ≤ 100
Example
Input
5
10
00
01000110010
1
11
Output
1
0
0
1
0

Game modes
Reverse

Test cases
Example Test
Input
5 10 00 01000110010 1 11
Output
1 0 0 1 0

Validator Example Validator
Input
6 10100101000000101 11 00 1 10 01
Output
0 0 0 1 1 1

Other strings Test
Input
9 01000 011 00101 00 0 0110 10 1 00101
Output
1 0 0 0 0 0 1 1 0

Validator Other strings Validator
Input
10 1 01 0101 11 110 1000 101 0010 1 0
Output
1 1 0 0 0 1 0 1 1 0

More strings to be sure Test
Input
23 11001 1110100010 1011 0111000011 111011010011111010001100101000 1111110101001 111 00010000010100011000000001100010110 01010111000000 00010001001011100110011010101011001110001 011110111111001 1001 100001101101000110000110 11011100011000111 100000001001011101110 10001010011011000100011111100100100110111110111001 000110001110101 01011000011111111100100000100110 000 000111011110 0000011001110 011000111010 111110001010111
Output
1 1 1 1 0 1 1 0 1 1 1 0 0 0 1 1 1 0 0 1 1 0 0

Validator More strings to be sure Validator
Input
23 000010000001 10111001000111111110100101111100101 10111000001010010110110000011100101101010 01000011001110001100 1001110010001111101110100001110 0010111010110101100000 0000111010100011101101 0010100010100101010101101110010101110001101001 11011000001101010111001101111101011001011000111000 011101001110110010 111 000101011000011000001 0000011000001101101100101110110101 0011111000010100101000110101 001001100000011011 0101111110000 111010110011000100111110110000010101000101100 0001011110000001110101110110011100 1101110010000111101011011011010110010001101111 10111101001011011101011100001000100101110001 10001110000010100000011 010001001000110111001010 01
Output
0 0 1 0 1 0 1 0 1 0 1 1 0 1 1 1 0 1 1 1 0 0 1

A lot Test
Input
100 00110110100010000100011100011111100011111110001101100011000 11001010 011111000011110101110101110100111010101010001111010001101001010000101000 1000010010100101010100000001011101010 101000010111101000110111111101110001011011010101011100101111001011000100000111010100 001011100011111010111110110001100000000011101101 10010001110000111000111010100100111010111111111 11100110010010011011101110101011100010110000110101001100111000101111010000101101110000 110101011000010101110001 1001110000100011111100011100011011101111111100111111001100001001000110 001010010110001011010111000 011000100010001011110101010000011011001010010100000101001101001000000100001001101010011010 101011111100110110100101001010111000001100010111100001100100000111100101111111011001001011000000100 00010101000110110100110000000111111001111101101111000011110001100011001 0100101100011011110001110011 010101010100100110010001101101110111111100011010110 0110111100100001100100111010100 0010011010011111101101101101010110011110110010000001100011010001010110000 01111100010110010001010101111010111000101110000100111111000000011001100 0011100000111000001011000101111110100110111001000011001111011 10010100111111111011110011001111 1010001111001101111011110100111101011010110111001 011111011001001001111110 000111001011001110010011111111111000000111010000011100110000000101000001011000 101000001100001111011010011100001 111100000000000000000010011011 011000001010010001010001010100011101010110101011100001001100011111110010010 0011111110111001000111011 10 0111000001010110001011010110110111011000101000011110011011101110100100100010 011100010101111001011 011000110111100000010111100010100011111000010001 10100101010101110010011011010000110001001010100101010111000110110 01001111100000001101001101111000011010110101001110111110111111011011110011101110010000101111010111 010100011100 00110000010001001011010100010101011001101011100011110010010100110110101101 110001 011000011010100110100101100010010010000111110010 11110011110110100010010100010000100110011011000111100011010 000111101100110000010111010111011100100011111000101 1111001010111110001111101000010100010010100010111011111111101001111111011010000110101 001110000000100111100110001111101110010011111010011 10100100111100011110110100110011101001111011 01100111001111001101011001010111001000101101111111010011111111011101011011011 1010111101000101110001110010001011101101101000111111100001000 100101000010000001001101001110010100100110101001100100010001101111101 101010110001100010000000111111110111001110010010110101 01001010100001011000111001011101011001 1001110100110100110100101001001100101110110100100001101111010110111000000000111111101011011011000110 11010100111010111111011111011111001110010111101101000100011001001 1101100001101101110011100010100111 010111001110000000000111010101010100111110001101101110 0011100000011011111101010100101110110111001000011010010000100110111001110 100001000011111001111101110100110101100110011010111100110 111101101100101100100100111100111000111111010101011111000010111110000000000010010110000011010 111000111011101011101001100001110010010011101110001 011011011111100110001110001110001101010011001001100011101001000101100111 00111111010001000111000001101111010111100111100010110001000011101111011001111010110001110 00101111111001011100000110000111000100001100100011001110000 101111111001010110111001101111101001111000110001111100101110111110110011110111101011 10100111001011101100111000001100001101100011100000010110000001 100100101110010100010100011101001100010100110000100101011101111100000010111011011111 000 000110111110001011000000100011 110011110011001111011001000110011100011100001010110111100110001 1010111100010111000001010111101100011 101011101010000110110011100100000000111111110010111001011011101101100011111110010010 1101100100111111001100101000110011110000111011000110101110011010010100 0001011001100110011101101011101011011110000000011011000010110111010100100111110111010100110110 11011110011111010110000000100101001000001101010 001010111010000101001110100011100110000000010111110000110110101010001011 01111111110011001111100011011011110110101011101000011000100011101001101101110011 1101000110000111010011001100010011111010001 0011001010101000011010001100111011011110100001011000 1100101010001010101010001101000111101100 011001010101101001010010111110010111110110110001100110111111111111100 0110101011100010100011011110001111011000101001000000001100010000001001011100010110111 00100001011001100011001 100011111101110010 0011010101110000110111 0010010010101010010110011011111011111 0010 01001011010010110110011110001101110011110011101111000010 01000100111110011110110101010010110001101101010000101000110001011011011110101 00100000010001011010010111010001110011000100100011100010101 01000001100010110001110011110011011110 111001111110000111101101100101110011001001101100000101010001111110111000110000111101011100001011110 01100111101001000101001101101110011001100101001100111011 111010111111001 0000110010010010001100011000111010110000111110110111001011101100 00111101100010011111101001001100001001000111111111100010011010100111011 0011001000010 000111101010111111101111110011000000101111000000100000011110010110100010100110101111 11011 0101000110110001101001111001110110001101 1101110000111000010000100100000111111001 1011111100010000010010111100001111100010101110001001100000000100110011111 101111 010001110010010111110000011000000111001111110100101000010100001100110000001010100011111111111111010 00111100010100001111101100011110010110101001010110110100010100110
Output
1 0 1 0 1 1 1 0 0 1 0 1 1 0 1 0 1 0 1 1 0 1 1 1 1 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 0 1 0 1 0 0 0 0 0 0 1 1 1 0 1 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 1 0 1 1 0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 0 0 0 1 0 1 1 1 1

Validator A lot Validator
Input
100 1110111111100100000001100000101101011101010101001110110000100011001010110100101110 000100100111001000 01110011001010010101010 00010110001100111011101001011110010011000000100010 0010100000100010100110010011001100000111101101011011010001101 11011001001011110 11110100000010011010001001100110101010110010101000011001111011010111110111101101101001100 00110011000001011001001001111000001011100001110101001101 0111111 101100010110011101111010000 00011011111011110100101010001100 10011011111100111000010000111 1001001101000110110 10100011010011101010001010110001000111001101001011110000110010001101001000001110001010110010011010 001000110110000010001011100100101011001001010111100001001101001001100110101110101110010101111101101 10101000010110100101010000011101001001011010001011000110010011001111010 111100101101100101100010111111001001101100011110100111011001000000010011010110111001111010111011 100000011001110101101110111001011 1101100011010000010000111001110110110011111100000 1000000111010110111100000110101100110110111110001101110001 11101111000000110111111101100011100000101101100101110000010111010100100011000100100110101111110 101 00101001010111011001011110010110110011111000011100100011 000000100010 11000000010 00111011100101110001000100100001011111000000 1100111011010010000001110000001101010110100001110100011100 001001111 001010001011011101001011100001111011000101100110010001 00000010110101101010001 1010001010110101000111111011100000 000 0111000100111010101100001110110100110010001011010111001 110101 0110111001100010111100001101111010001110001110110001110010000011110110100 011101000011101011010000 111010101011011100011100000101111000011011111110111000 011 010011001000000110100011001001001 0001101100001111001011000010111001110101111011101000010101101100110000100111000100011110000000 10100000011110111111011111001111110010001000101100011001011110 010000110110000100001111010101100000010000111000110100000100001011011100101101000100 0100010111011110101111101011110100010011110101011001010001011010010 1010000111001100111001111101011100101011111111100100010011011 01011111000011111 000110100101111110001011100000100011110001011 0101111111111010001101 0100001110000010011001011000110 01110110011011100011001010001011100100001000011000011110110000011011100110001100111011101000 01110110000101000101100101101001000010100000111001000110010011110110000 111001100100011000010110000111110101010101000111100110111000001001010110011010000001001010 11111101110010100100110011011001010010111 01010110 0101101011001010010101101011010110 0000010001000000101010011001101100111011001111101001101111101100111110100011101101011101100101111 11100000 1110000000011010010011001001001010110111001010100011 1 010001001111001001110101001101001100111111011011001100111010010100111001100101101 1110001100110110011110100010000001110001111100 0 10010011011100010100111100100110011101111101100010 1010111111100101 0111101111101110010010100 110101101101010111010110100000010011000111101010110110001100100011101111 1011000101011010110010001010011011000000011010011010111111101010001110000 001110001110011001111110001110011011001110001001101011011110 00001011100100000111000100111001011110100101011010001011101110 0000100101100010010101100011001110 1110 0010100100011011111000100011 01110101 100011011001110011100111011100101001011110110001011001110111 00000100100010111110000011100110001110001010000110111100000000010001100100111101101100011101 01111000101011011001101110010111101010100001111100 1001010111101010011000110111110001000101 010 01110101100010111101010100011111011 100010101100111011111100011100100010001101111100100110110011000100000000111011100101000010010011001 0010000010100000000110100 10011011010110101111011110 01100011000101101100111100100010000011000001111100101110 1 010000110100000111101011111110001100100110110111011000001 001101010000001110111100010010001 001110000010110000001001010010100000000010111100011 01001000001010111111111100100010100011000010100100111000010100111011001101011101111 01100000000011111001111000011101010011001111111011101010000001000011110011000111100 10110011010110 1111110001101000101001001000 0101110110011010111010100010110000110100101101100000110111 0001010111101 011000101010111111110111001111000101000011111110001011111011101111001011011110011101110001000111101 011010011001101110110101010101011101101000001010000000110111010100010110 0111111000011011111110011000011101100110011011 10100110110000100111100110000010110110110010 01101111111110101100000100010011101100101000 10101110110011 10101100001010101011100111011001 0001101001111110101010100110111111011110101000001111010101
Output
1 0 1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 0 0 0 1 1 0 1 0 1 1 0 0 0 0 1 1 0 0 0 1 1 1 0 1 0 1 0 0 0 1 0 0 0 1 1 1 1 0 1 0 1 1 1 1 1 0 0 0 1 1 1 1 0 0 1 1 1 1 0 1 0 1 1 0 0 0 1 0 1 0 1 1 1 0 1 1 1 1 0

Solution language

Solution

Stub generator input
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants