結果
| 問題 |
No.112 ややこしい鶴亀算
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-12-29 19:52:11 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 5,000 ms |
| コード長 | 426 bytes |
| コンパイル時間 | 104 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-10-04 09:06:21 |
| 合計ジャッジ時間 | 1,687 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
N = int(input())
a = list(map(int,input().split()))
s = set(a)
if len(s) == 1:
if a[0] == 4 * (N-1):
print(0,N)
else:
print(N,0)
else:
x = a[0]
for i in a:
if i != x:
y = i
break
if y < x:
y,x = x,y
count1 = 0
count2 = 0
for i in a:
if i == x:
count1 += 1
else:
count2 += 1
print(count2,count1)