QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#24169#3004. It's a Mod, Mod, Mod, Mod WorldJesus123Compile Error//C301b2022-03-27 03:57:022022-05-18 04:15:35

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-05-18 04:15:35]
  • 评测
  • [2022-03-27 03:57:02]
  • 提交

answer


w = int(input())
respuesta = 0
lista = ""
for i in range (0, w):
    p, q, n= [int(c) for c in input().split(' ')]
    for j in range (1, n+1):
        respuesta = respuesta + (p * j) % q
        
    lista = lista + str(respuesta) + "\n"
    respuesta = 0
lista = lista[:-1]
print(lista)

Details

answer.code:2:1: warning: data definition has no type or storage class
 w = int(input())
 ^
answer.code:2:1: warning: type defaults to ‘int’ in declaration of ‘w’ [-Wimplicit-int]
answer.code:2:5: error: expected expression before ‘int’
 w = int(input())
     ^~~