結果
問題 |
No.1120 Strange Teacher
|
ユーザー |
![]() |
提出日時 | 2021-05-07 08:41:03 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 372 bytes |
コンパイル時間 | 238 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 103,680 KB |
最終ジャッジ日時 | 2024-09-14 21:51:46 |
合計ジャッジ時間 | 4,410 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 2 |
ソースコード
N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) flg=0 if N==2: if sum(A)==sum(B): flg=1 time=abs(A[0]-B[0]) else: if (sum(A)-sum(B))%(N-2)==0: time=(sum(A)-sum(B))//(N-2) flg=1 for i in range(N): if (A[i]-B[i]+time)%2==1: flg=0 print(time if flg else -1)