QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#683488#8340. 3 Sumucup-team3519#Compile Error//C++17447b2024-10-27 21:25:452024-10-27 21:25:48

Judging History

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

  • [2024-10-27 21:25:48]
  • 评测
  • [2024-10-27 21:25:45]
  • 提交

answer

mod = 444445555566666677

n, k = map(int, input().split())

a = []

# print(a)

M = 10**k - 1

for i in range(0, n) : 
    tmp = int(input())
    tmp %= M
    tmp %= mod
    a.append(tmp)

ans = 0

for i in range(n) : 
    for j in range(i, n) : 
        for k in range(j, n) : 
            tmp = (a[i] + a[j] + a[k]) % mod
            ans += tmp == 0 or tmp == M or tmp == (M * 2) % mod or tmp == (M * 3) % mod

print(ans)

Details

answer.code:7:3: error: invalid preprocessing directive #print
    7 | # print(a)
      |   ^~~~~
answer.code:1:1: error: ‘mod’ does not name a type
    1 | mod = 444445555566666677
      | ^~~