| Task: | Entrepreneur |
| Sender: | aalto26aw_009 |
| Submission time: | 2026-09-02 17:49:36 +0300 |
| Language: | Python3 (CPython3) |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.02 s | details |
| #2 | WRONG ANSWER | 0.02 s | details |
| #3 | WRONG ANSWER | 0.02 s | details |
| #4 | ACCEPTED | 0.02 s | details |
| #5 | ACCEPTED | 0.02 s | details |
| #6 | WRONG ANSWER | 0.10 s | details |
| #7 | WRONG ANSWER | 0.12 s | details |
| #8 | ACCEPTED | 0.24 s | details |
| #9 | WRONG ANSWER | 0.30 s | details |
| #10 | TIME LIMIT EXCEEDED | -- | details |
| #11 | WRONG ANSWER | 0.02 s | details |
| #12 | WRONG ANSWER | 0.02 s | details |
| #13 | WRONG ANSWER | 0.02 s | details |
| #14 | WRONG ANSWER | 0.02 s | details |
Code
n, t = input().split()
t = int(t)
n = int(n)
from math import floor
times = input().split()
efficiencies = [0]*n
counts = [0]*n
for i in range(n):
times[i] = int(times[i])
efficiencies[i] = 1/times[i]
sum_ei = sum(efficiencies)
t_div_sum_ei = t/sum_ei
for i in range(n):
counts[i] = floor( t_div_sum_ei*efficiencies[i] )
n_already_in = sum(counts)
# print(counts, "already : ", n_already_in, "and rest : ", t-n_already_in)
for i in range(t-n_already_in):
# find min array
min_new_time, index = (counts[0] +1)* times[0], 0
for k in range(1,n):
new_time = (counts[k] +1)* times[k]
if new_time < min_new_time:
min_new_time = new_time
index = k
# put one there
counts[index] += 1
# print(counts)
final_times = [0]*n
min_final = times[0] * counts[0]
for i in range(n):
final_times[i] = times[i] * counts[i]
if final_times[i] < min_final:
min_final = final_times[i]
print(min_final)Test details
Test 1
Verdict: WRONG ANSWER
| input |
|---|
| 10 10 6 5 1 2 1 5 10 4 6 6 |
| correct output |
|---|
| 4 |
| user output |
|---|
| 0 |
Feedback: Incorrect character on line 1 col 1: expected "4", got "0"
Test 2
Verdict: WRONG ANSWER
| input |
|---|
| 10 10 6 6 4 3 4 9 3 2 6 10 |
| correct output |
|---|
| 6 |
| user output |
|---|
| 0 |
Feedback: Incorrect character on line 1 col 1: expected "6", got "0"
Test 3
Verdict: WRONG ANSWER
| input |
|---|
| 10 10 5 4 10 7 8 4 1 8 9 2 |
| correct output |
|---|
| 5 |
| user output |
|---|
| 0 |
Feedback: Incorrect character on line 1 col 1: expected "5", got "0"
Test 4
Verdict: ACCEPTED
| input |
|---|
| 1 1000000000 1 |
| correct output |
|---|
| 1000000000 |
| user output |
|---|
| 1000000000 |
Test 5
Verdict: ACCEPTED
| input |
|---|
| 1 1000000000 1000000000 |
| correct output |
|---|
| 1000000000000000000 |
| user output |
|---|
| 1000000000000000000 |
Test 6
Verdict: WRONG ANSWER
| input |
|---|
| 1000 1000 271 687 392 992 11 410 702 870... |
| correct output |
|---|
| 223 |
| user output |
|---|
| 0 |
Feedback: Incorrect character on line 1 col 1: expected "223", got "0"
Test 7
Verdict: WRONG ANSWER
| input |
|---|
| 1000 1000 598 523 703 794 737 689 724 26... |
| correct output |
|---|
| 282 |
| user output |
|---|
| 0 |
Feedback: Incorrect character on line 1 col 1: expected "282", got "0"
Test 8
Verdict: ACCEPTED
| input |
|---|
| 200000 1000000000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
| correct output |
|---|
| 5000 |
| user output |
|---|
| 5000 |
Test 9
Verdict: WRONG ANSWER
| input |
|---|
| 200000 1 760045594 599341056 300698860 ... |
| correct output |
|---|
| 8214 |
| user output |
|---|
| 0 |
Feedback: Incorrect character on line 1 col 1: expected "8214", got "0"
Test 10
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 200000 1000000000 33941840 210038922 596070148 7... |
| correct output |
|---|
| 371045814100 |
| user output |
|---|
| (empty) |
Test 11
Verdict: WRONG ANSWER
| input |
|---|
| 25 1000000000 1000000000 1 1 1 1 1 1 1 1 1 1... |
| correct output |
|---|
| 41666667 |
| user output |
|---|
| 0 |
Feedback: Incorrect character on line 1 col 1: expected "41666667", got "0"
Test 12
Verdict: WRONG ANSWER
| input |
|---|
| 12 1000000000 1 1 1 1 1 1 1 1 1 1 1 10000000... |
| correct output |
|---|
| 90909091 |
| user output |
|---|
| 0 |
Feedback: Incorrect character on line 1 col 1: expected "90909091", got "0"
Test 13
Verdict: WRONG ANSWER
| input |
|---|
| 23 1000000000 1000000000 1000000000 10000000... |
| correct output |
|---|
| 43478261000000000 |
| user output |
|---|
| 43478260000000000 |
Feedback: Incorrect character on line 1 col 8: expected "434782610000...", got "434782600000..."
Test 14
Verdict: WRONG ANSWER
| input |
|---|
| 3 3 10 11 12 |
| correct output |
|---|
| 12 |
| user output |
|---|
| 10 |
Feedback: Incorrect character on line 1 col 2: expected "12", got "10"
