#include <iostream>
using namespace std;
bool IsYear(int x)
{
int a, b, c, d; // 个十百千
a = x % 10;
x /= 10;
b = x % 10;
x /= 10;
c = x % 10;
d = x / 10;
if(b == d && a == c + 1) return true;
return false;
}
int main()
{
int res = 0, x;
for(int i = 0; i < 5; i++)
{
cin >> x;
if(IsYear(x)) res ++;
}
cout << res << endl;
return 0;
}
3496.特殊年份
最新推荐文章于 2024-08-26 00:02:00 发布