---
# System prepended metadata

title: 測試題目

---

# 測試題目

``` python
print('1')
```
# a271
``` python
a = int(input())
x = 0
y = 0
z = 0
w = 0
n = 0
m = 0
count = 0
for i in range(0 ,a):
    b = input()
    b = b.split()
    x = int(b[0])
    y = int(b[1])
    z = int(b[2])
    w = int(b[3])
    n = int(b[4])
    m = int(b[5])
    c = input()
    c = c.split()
    for j in range(len(c)):

        if count >= 0:
            m -= count*n

        if int(c[j]) == 1:
            m += x
            
        elif int(c[j]) == 2:
            
            
            m += y
        elif int(c[j]) == 3:
            m -= z
            
            
        elif int(c[j]) == 4:
            
            count += 1
            m -= w
            
        if m <0:
            
            break
        
    if m <= 0:
        print('bye~Rabbit')
    else:
        print(str(m)+ 'g')


```
# e973
``` python
data = [[0,0],
        [1,0],
        [2,0],
        [3,0],
        [4,0],
        [5,0],
        [6,0],
        [7,0],
        [8,0],
        [9,0]]
t = list(map(int,list(input())))
for i in range(len(t)):
    idx = t[i]
    data[idx][1] += 1
    
            
r = sorted(data,key=lambda x: x[1],reverse=True)

for row in r:
    if row[1] != 0:
        print(row[0],end=' ')


```
#d660
``` python

wall = 0

T = int(input())

for i in range(T):

    high_jump = 0
    low_jump = 0
    
    N = int(input())
    high = input().split()

    for j in range(len(high)-1):

        if int(high[j]) > int(high[j+1]):
            low_jump += 1 
            wall += 1
        if int(high[j]) < int(high[j+1]):

            high_jump += 1 
            wall += 1
    print('Case',str(i+1)+':',high_jump,low_jump)
'''
