結果
| 問題 | No.2821 A[i] ← 2A[j] - A[i] |
| コンテスト | |
| ユーザー |
むつある
|
| 提出日時 | 2024-07-26 22:30:26 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 283 bytes |
| 記録 | |
| コンパイル時間 | 895 ms |
| コンパイル使用メモリ | 85,092 KB |
| 実行使用メモリ | 131,640 KB |
| 最終ジャッジ日時 | 2026-04-03 18:43:35 |
| 合計ジャッジ時間 | 3,940 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 33 |
ソースコード
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)
むつある