Skip to content

Commit

Permalink
style: reformat file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
AritroSaha10 committed Feb 7, 2023
1 parent d199c91 commit 698f93b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions 2016S2.py → 2016/s2.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
qType = input()
totalSpeed = 0
if qType =='1':
n = input() # dont need this input
# looking for min total speed
dmojStan = input().split()
pegLand = input().split()
# make sure to convert everything to int, otherwise sorting will be weird
dmojStan = [int(x) for x in dmojStan]
pegLand = [int(x) for x in pegLand]
dmojStan.sort()
pegLand.sort()
for i in range(len(dmojStan)):
bikeSpeed = max(int(dmojStan[i]), int(pegLand[i]))
totalSpeed += bikeSpeed
print(totalSpeed)
else:
n = input() # dont need this input
# looking for max total speed
dmojStan = input().split()
pegLand = input().split()
# make sure to convert everything to int, otherwise sorting will be weird
dmojStan = [int(x) for x in dmojStan]
pegLand = [int(x) for x in pegLand]
dmojStan.sort()
pegLand.sort()
pegLand.reverse()
for i in range(len(dmojStan)):
bikeSpeed = max(int(dmojStan[i]), int(pegLand[i]))
totalSpeed += bikeSpeed
print(totalSpeed)
qType = input()
totalSpeed = 0
if qType =='1':
n = input() # dont need this input
# looking for min total speed
dmojStan = input().split()
pegLand = input().split()
# make sure to convert everything to int, otherwise sorting will be weird
dmojStan = [int(x) for x in dmojStan]
pegLand = [int(x) for x in pegLand]
dmojStan.sort()
pegLand.sort()
for i in range(len(dmojStan)):
bikeSpeed = max(int(dmojStan[i]), int(pegLand[i]))
totalSpeed += bikeSpeed
print(totalSpeed)
else:
n = input() # dont need this input
# looking for max total speed
dmojStan = input().split()
pegLand = input().split()
# make sure to convert everything to int, otherwise sorting will be weird
dmojStan = [int(x) for x in dmojStan]
pegLand = [int(x) for x in pegLand]
dmojStan.sort()
pegLand.sort()
pegLand.reverse()
for i in range(len(dmojStan)):
bikeSpeed = max(int(dmojStan[i]), int(pegLand[i]))
totalSpeed += bikeSpeed
print(totalSpeed)
File renamed without changes.
File renamed without changes.

0 comments on commit 698f93b

Please sign in to comment.