#include <stdio.h>
#include <string.h>
int main(void) {
char p1[10], p2[10];
size_t lenp1, lenp2;
fgets(p1
, sizeof p1
, stdin
); if (p1[lenp1 - 1] == '\n') {
/* nome completo, com ENTER incluido */
p1[--lenp1] = 0; // apagar o ENTER
} else {
/* ENTER e possivelmente outros caracteres ficaram no buffer */
int ch;
do ch
= getchar(); while (ch
!= '\n'); // limpa caracteres extra }
fgets(p2
, sizeof p2
, stdin
); if (p2[lenp2 - 1] == '\n') {
/* nome completo, com ENTER incluido */
p2[--lenp2] = 0; // apagar o ENTER
} else {
/* ENTER e possivelmente outros caracteres ficaram no buffer */
int ch;
do ch
= getchar(); while (ch
!= '\n'); // limpa caracteres extra }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCmludCBtYWluKHZvaWQpIHsKICAgIGNoYXIgcDFbMTBdLCBwMlsxMF07CiAgICBzaXplX3QgbGVucDEsIGxlbnAyOwoKICAgIGZnZXRzKHAxLCBzaXplb2YgcDEsIHN0ZGluKTsKICAgIGxlbnAxID0gc3RybGVuKHAxKTsKICAgIGlmIChwMVtsZW5wMSAtIDFdID09ICdcbicpIHsKICAgICAgICAvKiBub21lIGNvbXBsZXRvLCBjb20gRU5URVIgaW5jbHVpZG8gKi8KICAgICAgICBwMVstLWxlbnAxXSA9IDA7IC8vIGFwYWdhciBvIEVOVEVSCiAgICB9IGVsc2UgewogICAgICAgIC8qIEVOVEVSIGUgcG9zc2l2ZWxtZW50ZSBvdXRyb3MgY2FyYWN0ZXJlcyBmaWNhcmFtIG5vIGJ1ZmZlciAqLwogICAgICAgIGludCBjaDsKICAgICAgICBkbyBjaCA9IGdldGNoYXIoKTsgd2hpbGUgKGNoICE9ICdcbicpOyAvLyBsaW1wYSBjYXJhY3RlcmVzIGV4dHJhCiAgICB9CiAgICBmZ2V0cyhwMiwgc2l6ZW9mIHAyLCBzdGRpbik7CiAgICBsZW5wMiA9IHN0cmxlbihwMik7CiAgICB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