关于 U269707 十二月 为什么是75分
  • 板块学术版
  • 楼主HOYOMIX_2D
  • 当前回复7
  • 已保存回复7
  • 发布时间2024/9/18 19:31
  • 上次更新2024/9/18 21:33:17
查看原帖
关于 U269707 十二月 为什么是75分
1387871
HOYOMIX_2D楼主2024/9/18 19:31
#include<bits/stdc++.h>
using namespace std;
int a,n;
int main(){
cin>>a>>n;
if(n==1 || n==3 || n==5 || n==7 || n==8 || n==10 || n==12){
cout<<"31";
}
else{
if(n==2){
if(a%4==0 || a%400==0){
cout<<"28";
}
else{
cout<<"29";
}
}
else{
cout<<"30";
}
}
return 0;
}
2024/9/18 19:31
加载中...