Gravatar
石页嘉
积分:5
提交:3 / 26
if(i%4==0)day[2]=29;
if(i%400!=0&&i%100==0)day[2]=28;
if(i%10*10+i/10%10<=12&&i%10*10+i/10%10!=0&&i/1000+i/100%10*10<=day[i%10*10+i/10%10]&&i/1000+i/100%10*10!=0)
ans++;
}
cout<<ans;
return 0;
}

题目 3979 篮球
2024-05-28 20:39:18
Gravatar
石页嘉
积分:5
提交:3 / 26
#include<bits/stdc++.h>
using namespace std;
char c;
int a[15],b[15],day[15]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int n,m,ans=0;
int main(){
freopen("datea.in" ,"r", stdin);
freopen("datea.out","w",stdout);
for(int i=1;i<=8;i++){
cin>>c;
a[i]=int(c-'0');
}
for(int i=1;i<=8;i++){
cin>>c;
b[i]=int(c-'0');
}
m=a[1]*1000+a[2]*100+a[3]*10+a[4];
n=b[1]*1000+b[2]*100+b[3]*10+b[4];
for(int i=m;i<=n;i++){
if(i%4

题目 3979 篮球
2024-05-28 20:38:37
Gravatar
石页嘉
积分:5
提交:3 / 26
#include<bits/stdc++.h>
using namespace std;
int main()
{
freopen("split.in","r",stdin);
freopen("split.out","w",stdout);
int a,i=2;
cin>>a;
for(;i*i<=a;){
if(a%i==0)
{
a=a/i;
cout<<i<<"*";
}else i++;
}

题目 3979 篮球
2024-05-28 20:37:30