結果
問題 |
No.112 ややこしい鶴亀算
|
ユーザー |
![]() |
提出日時 | 2017-04-27 22:39:10 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 600 bytes |
コンパイル時間 | 2,240 ms |
コンパイル使用メモリ | 75,440 KB |
実行使用メモリ | 52,908 KB |
最終ジャッジ日時 | 2024-09-13 14:54:53 |
合計ジャッジ時間 | 5,265 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 3 WA * 20 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader =new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(reader.readLine()); String[] inputs = reader.readLine().split(" "); int turtle = 0; for (int i = 0; i < N; i++) { if(Integer.parseInt(inputs[i]) == 2) { turtle += 1; } } System.out.println((N-turtle) + " " + turtle); } }