Submission #2532009


Source Code Expand

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()

    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result

arr_data = getinputdata()

k = int(arr_data[0][0])
a = int(arr_data[0][1])
b = int(arr_data[0][2])

cnt = a - b

rate = a

if rate >= k:
    
    print(1)
    
else:
    
    if (k-rate) % cnt == 0:
        
        num = (k-rate) // cnt 
        
        print(1+ num*2)
    
    else:
        
        num = ((k-rate) // cnt) + 1
        
        if num>=1 :
        
            print(num*2+1)
        
        else:
            
            print(-1)

Submission Info

Submission Time
Task A - Kaiden
User senshi2000
Language Python (3.4.3)
Score 0
Code Size 966 Byte
Status RE
Exec Time 17 ms
Memory 3064 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
AC × 3
AC × 12
RE × 1
Set Name Test Cases
Sample a01, a02, a03
All a01, a02, a03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13
Case Name Status Exec Time Memory
a01 AC 17 ms 3064 KB
a02 AC 17 ms 3064 KB
a03 AC 17 ms 3064 KB
b04 AC 17 ms 3064 KB
b05 AC 17 ms 3064 KB
b06 AC 17 ms 3064 KB
b07 AC 17 ms 3064 KB
b08 AC 17 ms 3064 KB
b09 AC 17 ms 3064 KB
b10 AC 17 ms 3064 KB
b11 RE 17 ms 3064 KB
b12 AC 17 ms 3064 KB
b13 AC 17 ms 3064 KB