`rn`函数因改为
```c++
bool rn(int n)
{
if(n%4!=0||(n%100==0&&n%400!=0)){
return 0;
}
else return 1;
}
```
by Tjaweiof @ 2023-07-05 15:50:41
@[hanyi741](/user/934390)
by Tjaweiof @ 2023-07-05 15:50:52
@[Tjaweiof](/user/550933)
还是只过了一个
by __HappY__ @ 2023-07-05 15:58:22
算了,你这样有点难搞,我认为我这样比较容易
```c++
bool rn(int n){
if(n%4==0&&n%100!=0&&n%400==0){
return 1;
}
else return 0;
}
```
by Tjaweiof @ 2023-07-05 16:04:53
@[hanyi741](/user/934390)
by Tjaweiof @ 2023-07-05 16:05:02
@[hanyi741](/user/934390) rn函数应改为
```cpp
bool rn(int n) {
if (n % 4 == 0 && n % 100 != 0 || n % 400 == 0) {
return 1;
} else return 0;
}
```
by chenluohan @ 2023-07-05 16:10:34
@[hanyi741](/user/934390)
```cpp
bool rn(int y){
if(y%4==0){
if(y%100==0){
if(y%400==0) return 1;
else return 0;
}
else return 1;
}
else return 0;
}
```
这个比较长,但是更好理解。
by zqh123b @ 2023-07-05 16:20:18
```
if(rn(x==1))
```
没看懂x==1的作用。
而且第二个for循环里面的x的初值已经变了
by 编码落寞 @ 2023-07-05 16:29:12
一大堆错误
by blue_gandi_ @ 2023-07-13 19:42:49