题解 | #游游的数字圈#
游游的数字圈
https://www.nowcoder.com/practice/16eafa41a4a242b8870cb2c5420ae089
import sys for line in sys.stdin: # 移除字符串末尾的换行符 a = line.strip() # 圆圈计数器初始化 circle_count = 0 # 遍历 for char in a: if char == '0' or char == '6' or char == '9': circle_count += 1 elif char == '8': circle_count += 2 # 输出圆圈总和 print(circle_count)#15天刷题#