QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#412434 | #8689. Compression | supepapupu | Compile Error | / | / | C++20 | 185b | 2024-05-16 14:13:06 | 2024-05-16 14:13:06 |
Judging History
answer
s = input()
n = len(s)
if s == '1' * n: print(1)
elif s == '0' * n: print(0)
elif s[0] != s[-1]: print(s[0] + s[-1])
else: print(s[0] + chr(ord('0') + ord('1') - ord(s[0])) + s[0])
Details
answer.code:1:1: error: ‘s’ does not name a type 1 | s = input() | ^