by@taiyoslime
AC
5226ms
import ballerina/io;public function main(){while(true){string s=io:readln("");io:println(s[s[1]==s[2]?2:4]);}}
144 441 511 563 563 968 193 931 125 326 521 117 994 345 673 377 855 764 733 332 462 668 144 885 133 935 355 283 977 547 131 138 177 751 563 598 766 764 727 223 787 677 952 223 572 952 293 385 837 994 616 228 756 564 711 179 421 194 258 535 277 226 571 762
4 1 9 9 3 1 3 3 5 3 6 4 3 5 7 1 7 5 6 2 6 2 9 3 9 2 5 1 1 5 7 7
Compiling source code.bal Running executables error: java.util.NoSuchElementException message=No line found at ballerina.io:readlnExtern(read.bal:30) ballerina.io:readln(read.bal:27) code:main(code.bal:1)