python-algorithm1422 Hacker rank Strong Password 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 #!/bin/python3 import math import os import random import re import sys # # Complete the 'minimumNumber' function below. # # The function is expected to return an INTEGER. # The function accepts following parameters: # 1. INTEGER n # 2. STRING password # def minimum.. 2021. 10. 28. Hacker rank CamelCase 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 #!/bin/python3 import math import os import random import re import sys # # Complete the 'camelcase' function below. # # The function is expected to return an INTEGER. # The function accepts STRING s as parameter. # def camelcase(s): # Write your code here ans=1 for i in s: if i.isupper()==True: ans+=1 retu.. 2021. 10. 28. Hacker rank Sparse Arrays 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 #!/bin/python3 import math import os import random import re import sys # # Complete the 'matchingStrings' function below. # # The function is expected to return an INTEGER_ARRAY. # The function accepts following parameters: # 1. STRING_ARRAY strings # 2.. 2021. 10. 28. Hacker rank Left Rotation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 #!/bin/python3 import math import os import random import re import sys from collections import deque # # Complete the 'rotateLeft' function below. # # The function is expected to return an INTEGER_ARRAY. # The function accepts following parameters: # 1. INTEGER d # 2. INTEGER_ARRAY .. 2021. 10. 28. Hacker rank Arrays - DS 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 #!/bin/python3 import math import os import random import re import sys # # Complete the 'reverseArray' function below. # # The function is expected to return an INTEGER_ARRAY. # The function accepts INTEGER_ARRAY a as parameter. # def reverseArray(a): # Write your code here a=reversed(a) return a if __name.. 2021. 10. 26. Hacker rank Big Sorting 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 #!/bin/python3 import math import os import random import re import sys # # Complete the 'bigSorting' function below. # # The function is expected to return a STRING_ARRAY. # The function accepts STRING_ARRAY unsorted as parameter. # def bigSorting(unsorted): # Write your code here unsorted= sorted.. 2021. 10. 26. 백준 21185 Some Sum 1 2 3 4 5 s=int (input()) if s%2==1: print('Either') else: if (s//2)%2==1 : print('Odd') else : print('Even') cs 2021. 10. 26. Hacker rank Time Conversion 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 #!/bin/python3 import math import os import random import re import sys # # Complete the 'timeConversion' function below. # # The function is expected to return a STRING. # The function accepts STRING s as parameter. # def timeConversion(s): # Write your code here s=s.split(':') hh=int(.. 2021. 10. 26. Hacker rank Birthday Cake Candles 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 #!/bin/python3 import math import os import random import re import sys # # Complete the 'birthdayCakeCandles' function below. # # The function is expected to return an INTEGER. # The function accepts INTEGER_ARRAY candles as parameter. # def birthdayCakeCandles(candles): # Write your code here return candles.cou.. 2021. 10. 26. Hacker rank Mini-Max Sum 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 #!/bin/python3 import math import os import random import re import sys # # Complete the 'miniMaxSum' function below. # # The function accepts INTEGER_ARRAY arr as parameter. # def miniMaxSum(arr): # Write your code here ans=sum(arr) print (ans-max(arr), ans-min(arr)) if __name__ == '__main__': arr = list(map(int, input().rstrip().sp.. 2021. 10. 26. Hacker rank Staircase 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 #!/bin/python3 import math import os import random import re import sys # # Complete the 'staircase' function below. # # The function accepts INTEGER n as parameter. # def staircase(n): # Write your code here for i in range(n): print(" "*(n-i-1),end='') print("#"*(i+1)) if __name__ == '__main__': n = int(input().strip()) staircase(n).. 2021. 10. 26. Hacker rank Diagonal Difference 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 #!/bin/python3 import math import os import random import re import sys # # Complete the 'diagonalDifference' function below. # # The function is expected to return an INTEGER. # The function accepts 2D_INTEGER_ARRAY arr as parameter. # def diagonalDifference(arr): # Write your code her.. 2021. 10. 26. 이전 1 ··· 64 65 66 67 68 69 70 ··· 119 다음