結果

問題 No.4 おもりと天秤
ユーザー warashi
提出日時 2015-02-09 16:11:50
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 279 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-23 16:23:03
合計ジャッジ時間 1,530 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
N = int(input())
W = [int(x) for x in input().split()]
if sum(W) % 2 == 1:
    print("impossible")
    exit()
wanted = sum(W) // 2

if wanted % 2 == 1 and len([0 for w in W if w % 2 == 1]) == 0:
    print("impossible")
    exit()

print("possible")
exit()
0