Submission #242173


Source Code Expand

Copy
n=int(input())
t=[]
for i in range(n):
	t.append(int(input()))
t.sort(reverse=True)
a=0
b=0
for i in range (n):
	if a<b:
		a+=t[i]
	else:
		b+=t[i]
print(max(a,b))

Submission Info

Submission Time
Task A - 高橋君とお肉
User qzwpq
Language Python (3.2.3)
Score 100
Code Size 175 Byte
Status AC
Exec Time 158 ms
Memory 8436 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 19
Set Name Test Cases
Sample subtask0-sample-01.txt, subtask0-sample-02.txt, subtask0-sample-03.txt
All subtask0-sample-01.txt, subtask0-sample-02.txt, subtask0-sample-03.txt, subtask1-01.txt, subtask1-02.txt, subtask1-03.txt, subtask1-04.txt, subtask1-05.txt, subtask1-06.txt, subtask1-07.txt, subtask1-08.txt, subtask1-09.txt, subtask1-10.txt, subtask1-11.txt, subtask1-12.txt, subtask1-13.txt, subtask1-14.txt, subtask1-15.txt, subtask1-16.txt
Case Name Status Exec Time Memory
subtask0-sample-01.txt AC 158 ms 8308 KB
subtask0-sample-02.txt AC 158 ms 8308 KB
subtask0-sample-03.txt AC 154 ms 8436 KB
subtask1-01.txt AC 152 ms 8304 KB
subtask1-02.txt AC 153 ms 8308 KB
subtask1-03.txt AC 147 ms 8436 KB
subtask1-04.txt AC 153 ms 8436 KB
subtask1-05.txt AC 142 ms 8304 KB
subtask1-06.txt AC 145 ms 8308 KB
subtask1-07.txt AC 141 ms 8308 KB
subtask1-08.txt AC 148 ms 8308 KB
subtask1-09.txt AC 139 ms 8292 KB
subtask1-10.txt AC 141 ms 8308 KB
subtask1-11.txt AC 133 ms 8292 KB
subtask1-12.txt AC 147 ms 8436 KB
subtask1-13.txt AC 147 ms 8280 KB
subtask1-14.txt AC 140 ms 8308 KB
subtask1-15.txt AC 152 ms 8308 KB
subtask1-16.txt AC 141 ms 8308 KB