This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import time | |
print( | |
""" | |
.__ __. .______ __ __ ________ ________ __ _______ | |
| \ | | | _ \ | | | | | / | / | | | ____| | |
| \| | ______| |_) | | | | | `---/ / `---/ / | | | |__ | |
| . ` | |______| ___/ | | | | / / / / | | | __| | |
| |\ | | | | `--' | / /----. / /----.| `----.| |____ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solve(list, size): | |
list = list.split(" ") | |
count_list = [None] * size | |
index = 0 | |
for i in list: | |
count = 0 | |
for j in list: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def trans(x): | |
if x == 0: return [0] | |
bit = [] | |
while x: | |
bit.append(x % 2) | |
x >>= 1 | |
arr = bit[::-1] | |
arr = list(map(str, arr)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gcd(a, b): | |
while b != 0: | |
(a, b) = (b, a % b) | |
return a | |
def main(): | |
while(True): | |
n1 = int(input("Please Enter First Number\n> ")) | |
n2 = int(input("Please Enter Secound Number\n> ")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
while(True): | |
name = str(input("Please Enter Your Name\n> ")) | |
print("\n") | |
name = name.lower() | |
temp = [] |