結果
| 問題 |
No.91 赤、緑、青の石
|
| コンテスト | |
| ユーザー |
hhgfhn1
|
| 提出日時 | 2018-10-30 18:20:15 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 213 ms / 5,000 ms |
| コード長 | 457 bytes |
| コンパイル時間 | 2,039 ms |
| コンパイル使用メモリ | 74,708 KB |
| 実行使用メモリ | 54,592 KB |
| 最終ジャッジ日時 | 2024-06-24 07:17:33 |
| 合計ジャッジ時間 | 8,129 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 28 |
ソースコード
import java.util.Arrays;
import java.util.Scanner;
public class Main {
@SuppressWarnings("resource")
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
int r=scanner.nextInt();
int b=scanner.nextInt();
int g=scanner.nextInt();
int x[]=new int[3];
x[0]=r;
x[1]=b;
x[2]=g;
Arrays.sort(x);
while(true) {
if(x[2]-x[0]<3)break;
x[0]++;
x[2]-=2;
Arrays.sort(x);
}
System.out.println(x[0]);
}
}
hhgfhn1