結果

問題 No.112 ややこしい鶴亀算
ユーザー jamad
提出日時 2017-07-30 04:19:37
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 321 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-10 21:05:36
合計ジャッジ時間 2,189 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other AC * 15 WA * 8
権限があれば一括ダウンロードができます

ソースコード

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