#include <stdio.h>
int main() {
int days_in_month = 30, first_day = 2; // วันแรกตรงกับอังคาร (2)
printf("Sun Mon Tue Wed Thu Fri Sat\n");
// พิมพ์ช่องว่างจนถึงวันแรก
for (int i = 1; i < first_day; i++) {
}
// พิมพ์วันที่
for (int day = 1; day <= days_in_month; day++) {
if ((day + first_day - 1) % 7 == 0) { // ถ้าครบ 7 วันให้ขึ้นบรรทัดใหม่
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICAgIGludCBkYXlzX2luX21vbnRoID0gMzAsIGZpcnN0X2RheSA9IDI7IC8vIOC4p+C4seC4meC5geC4o+C4geC4leC4o+C4h+C4geC4seC4muC4reC4seC4h+C4hOC4suC4oyAoMikKICAgIHByaW50ZigiU3VuIE1vbiBUdWUgV2VkIFRodSBGcmkgU2F0XG4iKTsKCiAgICAvLyDguJ7guLTguKHguJ7guYzguIrguYjguK3guIfguKfguYjguLLguIfguIjguJnguJbguLbguIfguKfguLHguJnguYHguKPguIEKICAgIGZvciAoaW50IGkgPSAxOyBpIDwgZmlyc3RfZGF5OyBpKyspIHsKICAgICAgICBwcmludGYoIiAgICAiKTsKICAgIH0KCiAgICAvLyDguJ7guLTguKHguJ7guYzguKfguLHguJnguJfguLXguYgKICAgIGZvciAoaW50IGRheSA9IDE7IGRheSA8PSBkYXlzX2luX21vbnRoOyBkYXkrKykgewogICAgICAgIHByaW50ZigiJTNkICIsIGRheSk7CiAgICAgICAgaWYgKChkYXkgKyBmaXJzdF9kYXkgLSAxKSAlIDcgPT0gMCkgeyAvLyDguJbguYnguLLguITguKPguJogNyDguKfguLHguJnguYPguKvguYnguILguLbguYnguJnguJrguKPguKPguJfguLHguJTguYPguKvguKHguYgKICAgICAgICAgICAgcHJpbnRmKCJcbiIpOwogICAgICAgIH0KICAgIH0KCiAgICByZXR1cm4gMDsKfQ==