結果

問題 No.91 赤、緑、青の石
ユーザー dora_maruta
提出日時 2015-01-03 14:15:52
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 330 bytes
コンパイル時間 591 ms
コンパイル使用メモリ 55,364 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-13 02:14:24
合計ジャッジ時間 1,565 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>

int main(){
	int r, b, g;
	std::cin >> r >> b >> g;
	int ans = 0;
	
	if (b < g)std::swap(b,g);
	if (r < b)std::swap(r, b);
	if (g > b)std::swap(g, b);//r>b>g
	if (r <= 2 && b <= 2 && g == 0){
		std::cout << 0 << std::endl;
		return 0;
	}
	r += b * 2;
	r += g * 2;
	
	std::cout << r/5 << std::endl;
	return 0;
}
0