結果
| 問題 |
No.904 サメトロ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-03 23:32:45 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 249 bytes |
| コンパイル時間 | 175 ms |
| コンパイル使用メモリ | 82,308 KB |
| 実行使用メモリ | 60,408 KB |
| 最終ジャッジ日時 | 2024-07-02 22:03:59 |
| 合計ジャッジ時間 | 3,128 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 WA * 14 |
ソースコード
n = int(input())
A = [0]*n
B = [0]*n
for i in range(n-1):
A[i+1],B[i+1] = map(int,input().split())
AS = sum(A)
BS = sum(B)
ans = 0
for a in range((n+2)*10**4):
b = a+AS-BS
if b >= 0 and a <= BS and b <= AS:
ans += 1
print(ans)