#方法一 但是当string很多的时候,就不行了 string = 'BANANA' S_score = 0 K_score = 0 vowel = 'AEIOU' for cut_len in range(len(string)): for s in range(len(string)): if len(string[s:s+cut_len+1]) == cut_len+1: if string[s:s+cut_len+1][0] in vowel: K_score += 1...
Introduction Python: Division 10 Easy Solution.py Introduction Loops 10 Easy Solution.py Introduction Write a function 10 Medium Solution.py Introduction Print Function 20 Easy Solution.py Basic Data Types List Comprehensions 10 Easy Solution.py Basic Data Types Find the Runner-Up Score! 10 Easy So...
Nested Lists.py Piling Up!Piling Up!.py Polar Coordinates.py Polynomials.py Power - Mod Power.py Print Function.py Python Evaluation.py Re.findall() & Re.finditer().py Re.split().py Re.start() & Re.end().py Re.start() & Re.end.py Reduce Function.py Regex Subs...
Python3: [print(('#' * (i + 1)).rjust(n)) for n in (int(input()),) for i in range(n)] joinis a list comprehension. Within the comprehension,for n in [int(raw_input())] for i in xrange(n)technically sets up a nested loop, although the outer loop only executes once. [...
Medium 40 Larry's Array Java Medium 40 Almost Sorted Java Medium 50 Matrix Layer Rotation Python3 O(n*m) O(n*m) Hard 80 Consecutive 1s in Binary Numbers Java O(n) O(1) Easy 30 Nested Logic Java O(1) O(1) Easy 40 Bitwise AND Java O(1) O(1) Easy 20 Strings#...
This fest has helped beginners to join/learn how open source works. Looking forward for more contribution in this community. Happy coding!About 30 days of code solution in C++/JAVA/C/Python/JavaScript/C# www.hackerrank.com/domains/tutorials/30-days-of-code Topics hacktoberfest hackerrank-...
Permutations in Python Problem : Find Runner-up (List) Python : Division Python : Lists Python : Loops Python : Nested List With Second Method Python : Print Function Python : Text Alignment Python : Text Wrap Python : Write a Function ...
Python If-Else.py Say Hello, World! With Python.py Write a function.py 02 - Basic Data Type Find the Runner-Up Score!.py Finding the percentage.py List Comprehensions.py Lists.py Nested Lists.py Tuples.py 03 - Strings Alphabet Rangoli.py Capitalize!.py Designer Door...
HackerRank solutions in Java/JS/Python/C++/C#. Contribute to zbn123/HackerRank development by creating an account on GitHub.
Medium 40 Larry's Array Java Medium 40 Almost Sorted Java Medium 50 Matrix Layer Rotation Python3 O(n*m) O(n*m) Hard 80 Consecutive 1s in Binary Numbers Java O(n) O(1) Easy 30 Nested Logic Java O(1) O(1) Easy 40 Bitwise AND Java O(1) O(1) Easy 20 Strings#...