hiho week 186 register

Ended

Participants:166

Verdict:Time Limit Exceeded
Score:20 / 100
Submitted:2018-01-27 18:57:41

Lang:Python2

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
nm = map(intraw_input().split())
s = raw_input()
len_list = []
for w in s.split():
    len_list.append(len(w))
times = 1
row = 1
col = 0
temp = 0
while times <= n:
    for w in len_list:
        temp += w
        if temp == m:
            row += 1
            temp = 0
        elif temp > m:
            row += 1
            temp = w
        col = temp
        temp += 1
    times += 1
print rowcol
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX