結果

問題 No.112 ややこしい鶴亀算
ユーザー Kinoshita
提出日時 2015-09-19 17:07:56
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 365 bytes
コンパイル時間 4,299 ms
コンパイル使用メモリ 76,228 KB
実行使用メモリ 55,080 KB
最終ジャッジ日時 2024-07-19 08:03:24
合計ジャッジ時間 6,791 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int turu = 0, kame = 0;
		
		for(int i = 0; i < n; i++){
			int x = sc.nextInt();
			if(x / (n - 1) == 2)turu++;
			if(x / (n - 1) == 4)kame++;
		}
		System.out.println(turu + " " + kame);
		
		sc.close();
	}
}
0