one liner :3
This commit is contained in:
parent
652ead01ea
commit
0eda976ed3
16
day6-2.py
16
day6-2.py
@ -1,13 +1,5 @@
|
|||||||
times = [44806572]#[71530]#[44,80,65,72]#[7,15,30]
|
times = 44806572#[71530]#[44,80,65,72]#[7,15,30]
|
||||||
distances_records = [208158110501102]#[940200]#[208,1581,1050,1102]#[9,40,200]
|
distances_records = 208158110501102#[940200]#[208,1581,1050,1102]#[9,40,200]
|
||||||
result = 1
|
|
||||||
i = 0
|
winning_times = [(times-trial_time_index)*(trial_time_index)>distances_records for trial_time_index in range(times)].count(True)
|
||||||
for time in times:
|
|
||||||
winning_times = 0
|
|
||||||
for trial_time_index in range(time):
|
|
||||||
if (time-trial_time_index)*(trial_time_index)>distances_records[i]:
|
|
||||||
winning_times+=1
|
|
||||||
i+=1
|
|
||||||
result*=winning_times
|
|
||||||
print(winning_times)
|
print(winning_times)
|
||||||
print(result)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user