Submission
Status:
[PPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: mameeewin
Problemset: คิดถึงแม่
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-13 16:23:01
#include <iostream>
#include <vector>
using namespace std;
int main(){
int n; cin >> n;
vector<int> months={31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
cout << ((n-1-(31+30+31+30+31-12))%7+7)%7+1;
}
/*
Mother's day: August 12
January: 31
February: 28
March: 31
April: 30
May: 31
June: 30
July: 31
August: 31
September: 30
October: 31
November: 30
December: 31
TEST
1. Given Testcases
2. Minimum
3. Maximum
4. Duplicates
5. Negative Numbers / Zero
CHECK
1. Indexing Error/Wrong Variable
2. Division/Modulo by Zero
3. Overflow/Constraints
4. Leftover Debugging Output
5. Filename
*/