結果

問題 No.2821 A[i] ← 2A[j] - A[i]
ユーザー むつある
提出日時 2024-07-26 22:30:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 283 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 135,096 KB
最終ジャッジ日時 2024-07-26 22:30:31
合計ジャッジ時間 4,959 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
s=set()
bool1=False
bool2=False
for i in a:
  s.add(i)
  if i%2:
    bool1=True
  else:
    bool2=True
  if len(s)==1:
    print(0)
  elif len(s)==2:
    print(max(s)-min(s))
  elif bool1 and bool2:
    print(1)
  else:
    print(2)
  
0