1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #include <stdio.h> #include <stdlib.h> int main() { int a; scanf("%d",&a); int h; char a[2][100]; for(int x=0;x<a;x++) { scanf("%d %[^ ] %[^\n]",&h,&a[0],&a[1]); if(h%2==0) printf("%s\n",a[1]); else printf("%s\n",a[0]); } return 1; } |
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCgppbnQgbWFpbigpCnsKCmludCBhOwpzY2FuZigiJWQiLCZhKTsKaW50IGg7CmNoYXIgYVsyXVsxMDBdOwpmb3IoaW50IHg9MDt4PGE7eCsrKQp7CglzY2FuZigiJWQgJVteIF0gJVteXG5dIiwmaCwmYVswXSwmYVsxXSk7CglpZihoJTI9PTApCglwcmludGYoIiVzXG4iLGFbMV0pOwoJZWxzZQoJcHJpbnRmKCIlc1xuIixhWzBdKTsKfQoKcmV0dXJuIDE7Cn0=
-
upload with new input
-
result: Success time: 0s memory: 2280 kB returned value: 0
6 25 asal asem 24 asal asem 23 asal asem 22 asal asem 21 asal asem 20 asal asem
prog.bc 5: syntax error prog.bc 8: syntax error prog.bc 9: syntax error prog.bc 11: syntax error prog.bc 11: syntax error prog.bc 12: syntax error prog.bc 12: syntax error prog.bc 14: syntax error prog.bc 14: syntax error prog.bc 14: syntax error prog.bc 16: syntax error prog.bc 16: syntax error prog.bc 18: syntax error prog.bc 21: Return outside of a function. (standard_in) 1: syntax error (standard_in) 2: syntax error (standard_in) 3: syntax error (standard_in) 4: syntax error (standard_in) 5: syntax error (standard_in) 6: syntax error (standard_in) 7: syntax error
-
result: Success time: 0s memory: 2280 kB returned value: 0
prog.bc 5: syntax error prog.bc 8: syntax error prog.bc 9: syntax error prog.bc 11: syntax error prog.bc 11: syntax error prog.bc 12: syntax error prog.bc 12: syntax error prog.bc 14: syntax error prog.bc 14: syntax error prog.bc 14: syntax error prog.bc 16: syntax error prog.bc 16: syntax error prog.bc 18: syntax error prog.bc 21: Return outside of a function. (standard_in) 1: syntax error



