#45788: PHYTHON簡單解


henryko (henry)

學校 : 臺北市立內湖國民小學
編號 : 273167
來源 : [123.252.21.196]
最後登入時間 :
2025-05-11 14:23:46
d660. 11764 - Jumping Mario -- UVa11764 | From: [123.252.21.196] | 發表日期 : 2025-04-12 19:01

T=int(input())
for i in range(T):
    N=int(input())
    seq=list(map(int,input().split()))
    low,high=0,0
    for j in range(1,len(seq)):
        if seq[j-1]>seq[j]:
            low+=1
        elif seq[j-1]<seq[j]:
            high+=1
    print(f"Case {i+1}: {high} {low}")

 
ZeroJudge Forum