代码拉取完成,页面将自动刷新
#include <iostream>
using namespace std;
bool flag[1232] = { 0 };
int main() {
int arr[] = { 5,6,8,6,9,1,6,1,2,4,9,1,9,8,2,3,6,4,7,7,
5,9,5,0,3,8,7,5,8,1,5,8,6,1,8,3,0,3,7,9,2,7,0,5,8,
8,5,7,0,9,9,1,9,4,4,6,8,6,3,3,8,5,1,6,3,4,6,7,0,7,8,2,7,6,
8,9,5,6,5,6,1,4,0,1,0,0,9,4,8,0,9,1,2,8,5,0,2,5,3,3
};
for (int i = 0; i < 100 - 7; i++) {
if (arr[i] != 2)
continue;
for (int a = i + 1; a < 100 - 6; a++) {
if (arr[a] != 0)
continue;
for (int b = a + 1; b < 100 - 5; b++) {
if (arr[b] != 2)
continue;
for (int c = b + 1; c < 100 - 4; c++) {
if (arr[c] != 3)
continue;
for (int d = c + 1; d < 100 - 3; d++) { //月份第一位
if (arr[d] >1)
continue;
for (int e = d + 1; e < 100 - 2; e++) {
int month = arr[d] * 10 + arr[e];
if (month == 0 || month > 12)//月份判断
continue;
for (int f = e + 1; f < 100 - 1; f++) { //日期第一位
if (arr[f] > 3)
continue;
for (int g = f + 1; g < 100 ; g++) { //日期
int day = arr[g] + arr[f] * 10;
if (day > 31 ||day==0)
continue;
int _flag = month * 100 + day;
flag[_flag] = true;
}
}
}
}
}
}
}
}
int ret = 0;
for (int q = 101; q < 1232; q++) {
if (q == 229 || q == 230 || q == 231 || q == 431 ||
q == 631 || q == 931 || q == 1131)
continue;
ret += flag[q];
}
cout << ret;
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。