結果
問題 |
No.91 赤、緑、青の石
|
ユーザー |
![]() |
提出日時 | 2015-10-13 12:59:58 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 596 bytes |
コンパイル時間 | 205 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-21 07:27:15 |
合計ジャッジ時間 | 2,478 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 WA * 3 |
ソースコード
s = list(map(int, input().split())) s.sort() total = s[0] for i in range(3): s[i] -= total while True: if s[0] == 0: if s[2]-s[1] < 3: z = s[1]//4 total += z*2 s[1] -= z*4 s[2] -= z*4 z = min((s[2]-s[1]+2)//2,s[2]//3) s[2] -= z*2 s[0] += z if all(s[i] > 0 for i in range(3)): m = min(s) total += m for i in range(3): s[i] -= m s.sort() if (s[1]==1 and s[2]<3) or (s[1]==0 and s[2]<5) or (s[1]==2 and s[2]==2): break # print(total , s) print(total)