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
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
import time | |
import random | |
class InstaLikeBOT: | |
def __init__(self, username, password): | |
self.username = username | |
self.password = password |
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
for i in range(1,int(input())+1): | |
print(pow(((pow(10,i)-1)//9),2)) |
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
# Enter your code here. Read input from STDIN. Print output to STDOUT | |
from math import atan | |
from math import degrees | |
ab = int(input()) | |
bc = int(input()) | |
print(str(round(degrees(atan((ab / 2) / (bc / 2))))) + "°") |
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
# Enter your code here. Read input from STDIN. Print output to STDOUT | |
import cmath | |
r = complex(input().strip()) | |
print(cmath.polar(r)[0]) | |
print(cmath.polar(r)[1]) |
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
# Remove the given code and pest this code | |
#!/bin/python3 | |
import re | |
n, m = map(int, input().split()) | |
a, b = [], "" | |
for _ in range(n): | |
a.append(input()) |
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
regex_integer_in_range = r"^[1-9]\d{5}$" # Do not delete 'r'. | |
regex_alternating_repetitive_digit_pair = r"(.)(?=.\1)" # Do not delete 'r'. | |
import re | |
P = input() | |
print (bool(re.match(regex_integer_in_range, P)) | |
and len(re.findall(regex_alternating_repetitive_digit_pair, P)) < 2) |
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
# Enter your code here. Read input from STDIN. Print output to STDOUT | |
a = set(input().split()) | |
print(all(a > set(input().split()) for _ in range(int(input())))) |
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
# Enter your code here. Read input from STDIN. Print output to STDOUT | |
for _ in range(int(input())): | |
a,A=int(input()),set(map(int,input().split())) | |
b,B=int(input()),set(map(int,input().split())) | |
if B==B.union(A): | |
print(True) | |
else: | |
print(False) |
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
# Enter your code here. Read input from STDIN. Print output to STDOUT | |
K = int(input()) | |
set_S = set() | |
sumlist_S = 0 | |
for i in input().split(): | |
I = int(i) | |
set_S.add(I) | |
sumlist_S += I |
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
if __name__ == '__main__': | |
(_, A) = (int(input()),set(map(int, input().split()))) | |
B = int(input()) | |
for _ in range(B): | |
(command, newSet) = (input().split()[0],set(map(int, input().split()))) | |
getattr(A, command)(newSet) | |
print (sum(A)) |
NewerOlder