Upload files to "/"
This commit is contained in:
parent
9e4c389634
commit
652ead01ea
13
day6-1.py
Normal file
13
day6-1.py
Normal file
@ -0,0 +1,13 @@
|
||||
times = [44,80,65,72]#[7,15,30]
|
||||
distances_records = [208,1581,1050,1102]#[9,40,200]
|
||||
result = 1
|
||||
i = 0
|
||||
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(result)
|
13
day6-2.py
Normal file
13
day6-2.py
Normal file
@ -0,0 +1,13 @@
|
||||
times = [44806572]#[71530]#[44,80,65,72]#[7,15,30]
|
||||
distances_records = [208158110501102]#[940200]#[208,1581,1050,1102]#[9,40,200]
|
||||
result = 1
|
||||
i = 0
|
||||
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(result)
|
Loading…
Reference in New Issue
Block a user