22932023-01-09 20:03:51neszbalDecimáliapython3Wrong answer 0/100587ms19964 KiB
import math

N = int(input())

L = list(map(int, input().split()))[::-1]

osszeg = 0

for i, ertek in enumerate(L):
    if math.floor(ertek / 10**i) *10**i *(10**(N-i-1)) > osszeg:
        osszeg = math.floor(ertek / 10**i) *10**i *(10**(N-i-1))
        continue
    if math.floor(ertek / 10**i) > 0:
        osszeg += math.floor(ertek / 10**i) *10**i *(10**(N-i-1))

print(osszeg)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms11232 KiB
2Accepted17ms11504 KiB
3Accepted17ms11900 KiB
subtask20/25
4Accepted17ms11976 KiB
5Wrong answer17ms12156 KiB
6Wrong answer17ms12500 KiB
7Wrong answer17ms12676 KiB
8Wrong answer17ms12836 KiB
subtask30/26
9Wrong answer17ms12708 KiB
10Wrong answer17ms12808 KiB
11Wrong answer17ms13368 KiB
12Wrong answer17ms13288 KiB
13Wrong answer17ms13112 KiB
14Accepted17ms13204 KiB
15Wrong answer17ms13028 KiB
16Wrong answer17ms13004 KiB
subtask40/19
17Wrong answer26ms13352 KiB
18Wrong answer24ms13396 KiB
19Wrong answer23ms13728 KiB
20Wrong answer26ms13572 KiB
subtask50/30
21Time limit exceeded570ms19380 KiB
22Time limit exceeded566ms19544 KiB
23Time limit exceeded579ms19532 KiB
24Time limit exceeded547ms19472 KiB
25Time limit exceeded564ms19808 KiB
26Time limit exceeded587ms19964 KiB
27Time limit exceeded575ms14292 KiB
28Wrong answer17ms13564 KiB