-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplayground.py
86 lines (63 loc) · 1.77 KB
/
playground.py
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
78
79
80
81
82
"""playground.py: playground for python coding test"""
__author__ = "Yang Liu"
__email__ = "[email protected]"
from collections import Counter, defaultdict, deque
from typing import List, Dict
# =======================
# read input
# =======================
import sys
# 反复读取一行
# for line in sys.stdin:
# a = line.split()
# print(int(a[0]) + int(a[1]))
# import sys
# if __name__ == "__main__":
# # 读取第一行的n
# n = int(sys.stdin.readline().strip())
# ans = 0
# for i in range(n):
# # 读取每一行
# line = sys.stdin.readline().strip()
# # 把每一行的数字分隔后转化成int列表
# values = list(map(int, line.split()))
# for v in values:
# ans += v
# print(ans)
# =========================
# End of input reading
# =========================
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
#####################################
# Insert your solution there
#####################################
# class Solution:
# def __init__(self):
# pass
#
# def your_func(self):
# pass
#####################################
# End of code
#####################################
# if __name__ == "__main__":
# ###################################
# # 测试模块
# ###################################
#
# ###################################
# # END of 测试模块
# ###################################
if __name__ == "__main__":
n = int(sys.stdin.readline().strip())
line = sys.stdin.readline().strip()
values = list(map(int, line.split()))
values = values[:n]