python-algorithm
백준 11121 Communication Channels
무적김두칠
2022. 11. 15. 17:03
https://www.acmicpc.net/problem/11121
11121번: Communication Channels
The first line of the input consists of a single number T, the number of transmissions. Then follow T lines with the input and the output of each transmission as binary strings, separated by a single space. 0 < T ≤ 100 All inputs and outputs has length l
www.acmicpc.net
1
2
3
4
5
6
7
8
9
10
11
|
def sol(origin,changed):
for i in range(len(origin)):
if origin[i]!=changed[i]:
return 'ERROR'
return 'OK'
if __name__ == '__main__':
t= int(input())
for i in range(t):
origin, changed = input().split()
print(sol(origin,changed))
|
cs |
한 글자만 달라도 에러입니다!
If at least one character is different , ERROR
반응형