Submission #2240128


Source Code Expand

import math
import sys

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()

#椅子はば
x = int(arr_data[0][0])
y = int(arr_data[0][1])
z = int(arr_data[0][2])

#print(x, y, z)

hasi = y + z

naka = y + z 

#座れる人数初期値
cnt = 0

#はしに座れる人数
#cnt+=x//(hasi)
#print(cnt)


if x >= hasi * 2:
    
    cnt += 2
    #残り
    x -= hasi * 2
    
elif x >= hasi:
    
    cnt += 1
    #残り
    x -= hasi



x-=z
#中に座れる人数
cnt += x // naka

print(cnt)



Submission Info

Submission Time
Task B - ISU
User senshi2000
Language Python (3.4.3)
Score 200
Code Size 1007 Byte
Status AC
Exec Time 18 ms
Memory 3064 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 5
AC × 17
Set Name Test Cases
Sample example_0, example_1, example_2, example_3, example_4
All example_0, example_1, example_2, example_3, example_4, rand_0, rand_1, rand_10, rand_11, rand_2, rand_3, rand_4, rand_5, rand_6, rand_7, rand_8, rand_9
Case Name Status Exec Time Memory
example_0 AC 17 ms 3064 KB
example_1 AC 17 ms 3064 KB
example_2 AC 17 ms 3064 KB
example_3 AC 17 ms 3064 KB
example_4 AC 17 ms 3064 KB
rand_0 AC 17 ms 3064 KB
rand_1 AC 18 ms 3064 KB
rand_10 AC 17 ms 3064 KB
rand_11 AC 17 ms 3064 KB
rand_2 AC 17 ms 3064 KB
rand_3 AC 17 ms 3064 KB
rand_4 AC 17 ms 3064 KB
rand_5 AC 17 ms 3064 KB
rand_6 AC 17 ms 3064 KB
rand_7 AC 17 ms 3064 KB
rand_8 AC 17 ms 3064 KB
rand_9 AC 17 ms 3064 KB