"""
题目来源:
https://www.lanqiao.cn/problems/3496/learning/?page=1&first_category_id=1&name=2023
这道题填空题, 只要考试结束前得出答案就可以了, 枚举暴力就行
"""
import os
import sys
# 请在此输入您的代码
goal = ['2','0','2','3']
def baohan(n):
b = False
s = str(n)
j = 0
for i in range(len(s)):
if s[i] == goal[j]:
j += 1
if j == 4:
b = True
break
return b
count=0
for i in range(12345678, 98765432 + 1):
print(count)
if not baohan(i):
count += 1
print(count)
蓝桥杯-2023
于 2024-03-23 16:58:57 首次发布