Sponsors

Tag: problem: (A) Petr and a calendar Solution in C/C++

Codeforces Round #393 (Div....

#include<stdio.h> int main() { int a={31,28,31,30,31,30,31,31,30,31,30,31}; int i,m,d,k,n,p; scanf("%d %d",&m,&d); k=7-d+1; i=m-1; n=a-k; p=n/7; if(p*7!=n) p++; printf("%d",p+1); }

Advertisement

spot_img