你好我想问一下,为什么我用Python实现后,代码不能通过呢 import sys # 读取输入的整数 lines = sys.stdin.readlines() began, end = map(int, lines[0].strip().split()) count = 0 a = sum(x for x in range(began+1)) while began <= end : if a % 3 == 0: count += 1 began += 1 a += began print(count)
点赞

相关推荐

点赞 评论 收藏
分享
牛客网
牛客企业服务