結果

問題 No.4 おもりと天秤
ユーザー tookunn_1213
提出日時 2015-08-16 13:48:35
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 242 bytes
コンパイル時間 48 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-18 09:50:46
合計ジャッジ時間 1,158 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(raw_input())
W = map(int,raw_input().split())
sumW = sum(W)
sorted(W)
if sumW % 2 == 1:
	print 'impossible'
else:
	s = 0
	i = 0
	while s < sumW /2:
		s += W[i]
		i += 1
	if s == sumW / 2:
		print 'possible'
	else:
		print 'impossible'
0