結果
| 問題 | No.112 ややこしい鶴亀算 |
| コンテスト | |
| ユーザー |
htensai
|
| 提出日時 | 2019-12-05 16:02:34 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 64 ms / 5,000 ms |
| + 434µs | |
| コード長 | 372 bytes |
| 記録 | |
| コンパイル時間 | 1,528 ms |
| コンパイル使用メモリ | 86,128 KB |
| 実行使用メモリ | 46,044 KB |
| 最終ジャッジ日時 | 2026-10-04 22:07:55 |
| 合計ジャッジ時間 | 4,899 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
import java.util.*;
public class Main {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int total = 0;
for (int i = 0; i < n; i++) {
total += sc.nextInt();
}
int count = total / (n - 1);
int turtle = (count - 2 * n) / 2;
int bird = n - turtle;
System.out.println(bird + " " + turtle);
}
}
htensai