Upload files to "/"

This commit is contained in:
red 2023-12-05 23:57:31 -06:00
parent 9e4c389634
commit 652ead01ea
2 changed files with 26 additions and 0 deletions

13
day6-1.py Normal file
View 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
View 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)