QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#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)

詳細信息

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