Task: | Tietoverkko |
Sender: | Tipu |
Submission time: | 2021-10-14 21:28:42 +0300 |
Language: | Python3 (CPython3) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
#3 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | WRONG ANSWER | 0.03 s | 1, 2, 3 | details |
#2 | WRONG ANSWER | 0.04 s | 2, 3 | details |
#3 | WRONG ANSWER | 0.59 s | 3 | details |
Code
def kerro(välit, n): luku = 0 i = 0 while i < len(välit): luku += välit[i] * (n - 1 - i) i += 1 return luku def main(): n = int(input()) i = 0 x = 0 välit = [] while i < n - 1: abx = input().split(" ") x = int(abx[2]) välit.append(x) i += 1 välit.sort() print(kerro(välit, n)) main()
Test details
Test 1
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
100 1 2 74 1 3 100 2 4 50 3 5 40 ... |
correct output |
---|
88687 |
user output |
---|
162632 |
Test 2
Group: 2, 3
Verdict: WRONG ANSWER
input |
---|
5000 1 2 613084013 1 3 832364259 2 4 411999902 3 5 989696303 ... |
correct output |
---|
1103702320243776 |
user output |
---|
4183854306632911 |
Test 3
Group: 3
Verdict: WRONG ANSWER
input |
---|
200000 1 2 613084013 1 3 832364259 2 4 411999902 3 5 989696303 ... |
correct output |
---|
1080549209850010931 |
user output |
---|
6652407974595782384 |