#include <stdio.h>
#include <time.h>
int main(void) {
const char *ds[] = {"Domingo", "Segunda", "Terca",
"Quarta", "Quinta", "Sexta", "Sabado"};
struct tm tm = {0};
tm.tm_mday = 1;
tm.tm_mon = 0; // Janeiro
tm.tm_year = 113; // 2013
tm.tm_isdst = 0;
printf("1 de Janeiro de %d calhou em %s.\n", tm.tm_year + 1900, ds[tm.tm_wday]);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDx0aW1lLmg+CgppbnQgbWFpbih2b2lkKSB7CiAgICBjb25zdCBjaGFyICpkc1tdID0geyJEb21pbmdvIiwgIlNlZ3VuZGEiLCAiVGVyY2EiLAogICAgICAgICAgICAgICAgICAgICAgICAiUXVhcnRhIiwgIlF1aW50YSIsICJTZXh0YSIsICJTYWJhZG8ifTsKICAgIHN0cnVjdCB0bSB0bSA9IHswfTsKICAgIHRtLnRtX21kYXkgPSAxOwogICAgdG0udG1fbW9uID0gMDsgLy8gSmFuZWlybwogICAgdG0udG1feWVhciA9IDExMzsgLy8gMjAxMwogICAgdG0udG1faXNkc3QgPSAwOwogICAgbWt0aW1lKCZ0bSk7IC8vIG5vcm1hbGl6YXIgdG0KICAgIHByaW50ZigiMSBkZSBKYW5laXJvIGRlICVkIGNhbGhvdSBlbSAlcy5cbiIsCiAgICAgICAgICB0bS50bV95ZWFyICsgMTkwMCwgZHNbdG0udG1fd2RheV0pOwogICAgcmV0dXJuIDA7Cn0=