QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#619488#8932. Bingoucup-team4074#Compile Error//C++20513b2024-10-07 14:23:032024-10-07 14:23:05

Judging History

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

  • [2024-10-07 14:23:05]
  • 评测
  • [2024-10-07 14:23:03]
  • 提交

answer

t = int(input())
for _ in range(t):
    n_s, m_s = input().split(' ')
    n_i, m_i = int(n_s), int(m_s)
    res = n_i + m_i - n_i % m_i

    n_i = max(n_i + 1, m_i)
    n_s = str(n_i)
    if m_s in n_s:
        print(n_i)
        continue

    len_n = len(n_s)
    len_m = len(m_s)
    l, r = len_n - len_m, len_n
    for __ in range(min(len_n - len_m + 1, 20)):
        sub_n_s = n_s[l:r]
        if int(sub_n_s) <= m_i:
            res = min(res, int(n_s[0:l] + m_s + n_s[r:]))
    print(res)

详细

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