結果

問題 No.4 おもりと天秤
コンテスト
ユーザー tookunn_1213
提出日時 2015-08-16 14:05:11
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 252 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 125 ms
コンパイル使用メモリ 77,580 KB
最終ジャッジ日時 2025-12-03 16:15:25
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(raw_input())
W = map(int,raw_input().split())
sumW = sum(W)
print sumW
W.sort()
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