結果
問題 |
No.91 赤、緑、青の石
|
ユーザー |
![]() |
提出日時 | 2015-04-19 12:13:06 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 563 bytes |
コンパイル時間 | 1,940 ms |
コンパイル使用メモリ | 74,364 KB |
実行使用メモリ | 41,668 KB |
最終ジャッジ日時 | 2024-07-04 17:53:00 |
合計ジャッジ時間 | 7,180 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 22 WA * 6 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner koko = new Scanner(System.in); int[] a = new int[3]; for(int i=0; i<3; i++){ a[i]=koko.nextInt(); } Arrays.sort(a); int number=a[0]; for(int i=0; i<3; i++){ a[i]=a[i]-number; } while(a[2]>=3&&a[1]>=1){ a[2]=a[2]-3; a[1]=a[1]-1; number++; Arrays.sort(a); } System.out.println(number); } }