結果
問題 |
No.112 ややこしい鶴亀算
|
ユーザー |
|
提出日時 | 2022-12-08 22:03:27 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 41 ms / 5,000 ms |
コード長 | 213 bytes |
コンパイル時間 | 293 ms |
コンパイル使用メモリ | 82,392 KB |
実行使用メモリ | 52,224 KB |
最終ジャッジ日時 | 2024-10-14 18:00:50 |
合計ジャッジ時間 | 2,170 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
N = int(input()) A = list(map(int, input().split())) t = max(A) k = min(A) if t != k: print(f'{2*N-1-t//2} {t//2-N+1}') else: if 2 * N == t + 2: print(f"{N} 0") else: print(f"0 {N}")