#include <time.h>
#include <stdlib.h>
#include <stdio.h>
int rand7(void)
{
const int ret[][2] = {
{2, 1}, {3, 2}, {5, 3}, {6, 4}, {8, 5}, {10, 6}, {12, 7}
};
int i;
for (i = 0; i < 7; i++) {
if (a*b == ret[i][0]) {
return ret[i][1];
}
}
return 0;
}
int main(void)
{
int num = 0;
while (num == 0) {
num = rand7();
}
return 0;
}
I2luY2x1ZGUgPHRpbWUuaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3RkaW8uaD4KCgoKaW50IHJhbmQ3KHZvaWQpCnsKICAgIGNvbnN0IGludCByZXRbXVsyXSA9IHsKICAgICAgICB7MiwgMX0sIHszLCAyfSwgezUsIDN9LCB7NiwgNH0sIHs4LCA1fSwgezEwLCA2fSwgezEyLCA3fQogICAgfTsKICAgIHNyYW5kKCh1bnNpZ25lZCl0aW1lKE5VTEwpKTsKICAgIGludCBhID0gcmFuZCgpICUgNSArIDE7CiAgICBpbnQgYiA9IHJhbmQoKSAlIDUgKyAxOwogICAgaW50IGk7CiAgICBmb3IgKGkgPSAwOyBpIDwgNzsgaSsrKSB7CiAgICAgICAgaWYgKGEqYiA9PSByZXRbaV1bMF0pIHsKICAgICAgICAgICAgcmV0dXJuIHJldFtpXVsxXTsKICAgICAgICB9CiAgICB9CiAgICByZXR1cm4gMDsgICAgCn0KCmludCBtYWluKHZvaWQpCnsKICAgIGludCBudW0gPSAwOwogICAgd2hpbGUgKG51bSA9PSAwKSB7CiAgICAgICAgbnVtID0gcmFuZDcoKTsKICAgIH0KICAgIHByaW50ZigiJWRcbiIsIG51bSk7CiAgICByZXR1cm4gMDsKICAgIAp9