QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#570181#6558. Allergen TestingUESTC_DECAYALI#Compile Error//C++20173b2024-09-17 14:33:112024-09-17 14:33:13

Judging History

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

  • [2024-09-17 14:33:13]
  • 评测
  • [2024-09-17 14:33:11]
  • 提交

answer

for _ in range(int(input())):
    n, k = map(int, input().split())
    ans = 1
    k += 1
    i = k
    while i < n:
        ans += 1
        i *= k
    print(ans)

Details

answer.code:1:1: error: expected unqualified-id before ‘for’
    1 | for _ in range(int(input())):
      | ^~~