-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpython_built_ins.py
More file actions
77 lines (70 loc) · 2.15 KB
/
Copy pathpython_built_ins.py
File metadata and controls
77 lines (70 loc) · 2.15 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
''' Here I continue to solve the chellenges by HackerRank
'''
import sys
from operator import attrgetter
import re
from functools import reduce
# TODO 1 "Python Evaluation"
# eval(input().strip())
# TODO 2 "Athlete Sort"
# def by_second_item(item):
# return item[1]
#
# k = 0
# def by_k_item(item):
# return item[k]
#
# def print_arr(arr):
# for item in arr:
# print(' '.join(map(str, item)))
#
# n, m = input().strip().split(' ')
# n, m = [int(n), int(m)]
# arr = []
# for arr_i in range(n):
# arr_1 = [int(arr_temp) for arr_temp in input().strip().split(' ')]
# arr.append(arr_1)
# k = int(input().strip())
# sorted_arr = sorted(arr, key=by_k_item)
# print_arr(sorted_arr)
# TODO 3 "Any or All"
# numbers = input().strip().split(' ') if int(input().strip()) else None
# print(all(list(map(lambda x: int(x) > 0, numbers))) and any(list(map(lambda x: str(x) == str(x)[::-1], numbers))))
# TODO 4 "ginortS"
# def separete_digits_1(str):
# if str.isdigit() and int(str) % 2 == 1:
# return True
# return False
#
#
# def separete_digits_2(str):
# if str.isdigit() and int(str) % 2 == 0:
# return True
# return False
#
#
# upp_chs = 'BCDFGHJKLMNPQRSTVWXZYAEIOU'
# lower_chs = 'bcdfghjklmnpqrstvwxzyaeiou'
# inp_str = input().strip()
#
# result_digit_part_1 = list(filter(lambda x: separete_digits_1(x), inp_str))
# result_digit_part_2 = list(filter(lambda x: separete_digits_2(x), inp_str))
# result_lower_part = list(filter(lambda x: x in 'bcdfghjklmnpqrstvwxzyaeiou', inp_str))
# result_upper_part = list(filter(lambda x: x in 'BCDFGHJKLMNPQRSTVWXZYAEIOU', inp_str))
#
# result_lower_part, result_upper_part, result_digit_part_1, result_digit_part_2 = list(
# map(sorted, [result_lower_part, result_upper_part, result_digit_part_1, result_digit_part_2]))
# result_list = result_lower_part + result_upper_part + result_digit_part_1 + result_digit_part_2
# result_str = reduce(lambda x, y: x + y, result_list)
# print(result_str)
# TODO 5 "Input()"
x, k = [int(x) for x in input().strip().split(' ')]
func = input().strip()
# print(x)
# print(k)
result = eval(func)
# print(result)
if result == k:
print(True)
else:
print(False)