結果
問題 |
No.185 和風
|
ユーザー |
![]() |
提出日時 | 2019-05-02 03:31:47 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 36 ms / 1,000 ms |
コード長 | 387 bytes |
コンパイル時間 | 407 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-12-31 12:55:39 |
合計ジャッジ時間 | 1,005 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 |
ソースコード
N = int(input()) terms = [[int(x) for x in input().split()] for y in range(N)] forecast = None is_censored = True for term in terms: base,add = term if base >= add: break fc = add - base if not forecast: forecast = fc else: if forecast != fc: break else: is_censored = False if is_censored: forecast = -1 print(forecast)