結果

問題 No.112 ややこしい鶴亀算
ユーザー jamadjamad
提出日時 2017-07-30 04:19:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 321 bytes
コンパイル時間 137 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-19 04:29:45
合計ジャッジ時間 1,647 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 32 ms
10,752 KB
testcase_03 AC 32 ms
10,752 KB
testcase_04 WA -
testcase_05 AC 28 ms
10,880 KB
testcase_06 AC 29 ms
10,880 KB
testcase_07 AC 29 ms
10,880 KB
testcase_08 AC 29 ms
10,752 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 29 ms
10,880 KB
testcase_12 AC 28 ms
10,752 KB
testcase_13 AC 29 ms
10,752 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 29 ms
10,880 KB
testcase_17 WA -
testcase_18 AC 29 ms
10,752 KB
testcase_19 AC 29 ms
10,752 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 28 ms
10,880 KB
testcase_23 AC 29 ms
10,880 KB
testcase_24 AC 29 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
#mn=min(A)
#X=[a-mn for a in A]
#print(X)
#x*2+y*2=(N-1)*2
#x*2+y*4=A[0]
B=[a//(N-1) for a in A]
#print(B)
m=min(B)
if m==0==max(B):
    if A[0]//(N-1)==4:print(0,N)
    else:print(N,0)
    
else:
    C=[x-m for x in B]
    #print(C)
    p=sum(C)
    q=N-p
    print(p,q)

0