Submission

Status:

P-P---------P-------

Subtask/Task Score:

15/100

Score: 15

User: nicekrittaphat

Problemset: ปฏิทินวันแม่

Language: cpp

Time: 0.003 second

Submitted On: 2026-10-10 20:41:40

#include <iostream>
using namespace std;

int main() 
{
    int a;
    int b;
    cin>>a>>b;

    int motherneed = 31+28+31+30+31+30+31+12;
    int day[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
    
    int have = 0;
    for(int i=0;i<a;i++){
        have += day[i];
    }
    cout<<(have+b)%7;
    

}