結果
| 問題 |
No.4 おもりと天秤
|
| コンテスト | |
| ユーザー |
tookunn_1213
|
| 提出日時 | 2015-08-16 14:05:34 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 241 bytes |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-18 09:50:54 |
| 合計ジャッジ時間 | 974 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 10 |
ソースコード
N = int(raw_input()) W = map(int,raw_input().split()) sumW = sum(W) 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'
tookunn_1213