結果
| 問題 |
No.112 ややこしい鶴亀算
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-09-23 20:08:06 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 133 ms / 5,000 ms |
| コード長 | 426 bytes |
| コンパイル時間 | 3,407 ms |
| コンパイル使用メモリ | 74,384 KB |
| 実行使用メモリ | 54,152 KB |
| 最終ジャッジ日時 | 2024-07-19 08:50:12 |
| 合計ジャッジ時間 | 6,956 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
import java.util.Scanner;
public class Main_yukicoder112 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int sum = 0;
for (int i = 0; i < n; i++) {
sum += sc.nextInt();
}
sum /= n - 1;
int b = (sum - 2 * n) / 2;
System.out.printf("%d %d\n", n - b, b);
sc.close();
}
}