QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#582430#9375. TouristClauvenater_Compile Error//C++20185b2024-09-22 16:23:482024-09-22 16:23:48

Judging History

你现在查看的是最新测评结果

  • [2024-09-22 16:23:48]
  • 评测
  • [2024-09-22 16:23:48]
  • 提交

answer

n = int(input())
arr = list(map(int,input().split()))
cur = 1500
ok = True
for i in range(len(arr)):
	cur += arr[i]
	if cur >= 4000:
		print(i+1)
		ok = False
		break
if ok:
	print(-1)

Details

answer.code:1:1: error: ‘n’ does not name a type
    1 | n = int(input())
      | ^