結果
問題 |
No.999 てん vs. ほむ
|
ユーザー |
![]() |
提出日時 | 2020-02-28 21:44:15 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 229 bytes |
コンパイル時間 | 157 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 38,156 KB |
最終ジャッジ日時 | 2024-10-13 17:10:42 |
合計ジャッジ時間 | 4,563 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 2 WA * 4 TLE * 1 -- * 13 |
ソースコード
N=int(input()) A=list(map(int,input().split())) count = 0 while len(A)>1: if max(A[0]-A[1],A[-1]-A[-2])==A[0]-A[1]: count += A[0]-A[1] A=A[2:] else: count+=A[-1]-A[-2] A=A[:-2] print(count)