結果
問題 | No.112 ややこしい鶴亀算 |
ユーザー | koukonko |
提出日時 | 2015-12-11 18:34:46 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 837 bytes |
コンパイル時間 | 3,664 ms |
コンパイル使用メモリ | 73,032 KB |
実行使用メモリ | 54,680 KB |
最終ジャッジ日時 | 2023-10-13 11:14:45 |
合計ジャッジ時間 | 7,085 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 76 ms
50,940 KB |
testcase_01 | AC | 73 ms
50,760 KB |
testcase_02 | AC | 77 ms
52,432 KB |
testcase_03 | AC | 77 ms
53,520 KB |
testcase_04 | AC | 74 ms
51,108 KB |
testcase_05 | WA | - |
testcase_06 | AC | 77 ms
52,300 KB |
testcase_07 | AC | 79 ms
52,592 KB |
testcase_08 | WA | - |
testcase_09 | AC | 79 ms
52,308 KB |
testcase_10 | AC | 82 ms
52,556 KB |
testcase_11 | AC | 79 ms
52,636 KB |
testcase_12 | AC | 80 ms
52,580 KB |
testcase_13 | WA | - |
testcase_14 | AC | 74 ms
50,560 KB |
testcase_15 | AC | 79 ms
51,260 KB |
testcase_16 | AC | 86 ms
52,416 KB |
testcase_17 | AC | 78 ms
51,268 KB |
testcase_18 | AC | 77 ms
52,144 KB |
testcase_19 | WA | - |
testcase_20 | AC | 77 ms
50,772 KB |
testcase_21 | AC | 75 ms
48,800 KB |
testcase_22 | AC | 73 ms
51,232 KB |
testcase_23 | AC | 77 ms
50,848 KB |
testcase_24 | WA | - |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); try { int count = Integer.parseInt(buff.readLine()); String[] box = buff.readLine().split(" "); int[] num = new int[count]; int max = 0; for(int i = 0; i < count; ++i){ num[i] = Integer.parseInt(box[i]); if(max < num[i]){ max = num[i]; } } int crane = 0; for(int i = 0; i < count; ++i){ if(max == num[i]){ crane++; } } System.out.println(crane + " " + (count-crane)); } catch (NumberFormatException e) { e.getStackTrace(); } catch (IOException e) { e.getStackTrace(); } catch (Exception e) { e.getStackTrace(); } } }