結果
問題 |
No.91 赤、緑、青の石
|
ユーザー |
|
提出日時 | 2020-12-28 18:11:33 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 5,000 ms |
コード長 | 507 bytes |
コンパイル時間 | 243 ms |
コンパイル使用メモリ | 82,536 KB |
実行使用メモリ | 53,824 KB |
最終ジャッジ日時 | 2024-06-24 07:30:27 |
合計ジャッジ時間 | 2,417 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 28 |
ソースコード
R,G,B = map(int,input().split()) high = 10**7+1 low = 0 while high-low>1: mid = (high+low)//2 x,y,z = R,G,B x -= mid y -= mid z -= mid if x<0 and y<0 and z<0: high = mid continue x,y,z = sorted([x,y,z]) if y>=0: cnt = y//2+z//2 if x+cnt>=0: low = mid continue high = mid continue else: if x+y+z//2>=0: low = mid continue high = mid continue print(low)