結果
| 問題 | No.112 ややこしい鶴亀算 |
| コンテスト | |
| ユーザー |
htensai
|
| 提出日時 | 2019-12-05 16:02:34 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 60 ms / 5,000 ms |
| コード長 | 372 bytes |
| 記録 | |
| コンパイル時間 | 1,773 ms |
| コンパイル使用メモリ | 83,284 KB |
| 実行使用メモリ | 43,264 KB |
| 最終ジャッジ日時 | 2026-05-27 02:22:49 |
| 合計ジャッジ時間 | 4,537 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_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