forked from prakash079/Hackerrank_python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtuples.py
More file actions
25 lines (16 loc) · 748 Bytes
/
tuples.py
File metadata and controls
25 lines (16 loc) · 748 Bytes
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
# Tuples
# Task
# Given an integer, n, and n space-separated integers as input, create a tuple, t, of those n integers. Then compute and print the result
# of hash(t).
# Note: hash() is one of the functions in the __builtins__ module, so it need not be imported.
# Input Format
# The first line contains an integer, n, denoting the number of elements in the tuple.
# The second line contains n space-separated integers describing the elements in tuple t.
# Output Format
# Print the result of hash(t).
-----------------------------------------------------------------------------------------------
if __name__ == '__main__':
n = int(input())
integer_list = map(int, input().split())
t=tuple(integer_list)
print (hash(t))