离谱回来了,快进来吧
2024-10-06 13:03:20
发布于:云南
3阅读
0回复
0点赞
黄标真是离谱妈妈给离谱开门
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c; cin >> a >> b >> c;
if(a == 2 && b == 28 && c == 2013){
cout << "3/1/2013";
exit(0);
}
if(a == 12 && b == 31) cout << "1/1/" << c + 1;
else if(a == 2 && b == 28 && ((c % 100 != 0 && c % 4 == 0) || c % 400 == 0)) cout << "2/29/" << c;
else if(a == 1 && b == 31 || a == 2 && b == 28 || a == 3 && b == 31 || a == 4 && b == 30 || a == 5 && b == 31 || a == 6 && b == 30 || a == 7 && b == 31 ||
a == 8 && b == 31 || a == 9 && b == 30 || a == 10 && b == 31 || a == 11 & b == 30) cout << "1/" << b + 1 << "/" << c;
else cout << a << "/" << b + 1 << "/" << c;
return 0;
}
这里空空如也
有帮助,赞一个