Alice_star @ 2024-01-11 12:47:00
#include<bits/stdc++.h>
using namespace std;
int i,j,n,m;
int a,b,c;
int num,cnt;
int s[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int main(){
scanf(" % d% d ",& n,& m);
for(i=1;i<=12;i++)
for(j=1;j<=s[i];j++){
c=( j % 10 )* 1000+( j / 10 )* 100+( i % 10 ) * 10 + ( i / 10 );
num = c * 10000 + i * 100 + j;
if ( num<n||num>m ) continue;
cnt++;
}
printf(" % d",cnt);
return 0;
}
by chengwanyun @ 2024-02-02 10:01:23
这就是纯模拟啊,建议再读读题目
by chengwanyun @ 2024-02-02 10:01:52
不好意思发错了
by chengwanyun @ 2024-02-02 10:14:36
给个关注赔不是QWQ
by suzakudry @ 2024-02-19 10:32:28
输出格式错了; printf(" % d",cnt);要求的输出格式只有一个数 ,改成这样printf("%d",cnt);