Problem:


階級

ボクシングは体重によって階級が分けられています。体重を読み込んで、その階級を出力するプログラムを作成してください。階級と体重の関係は以下の表のとおりとします。

階級体重（kg）

light fly48.00kg 以下

fly48.00kg 超 51.00kg 以下

bantam51.00kg 超 54.00kg 以下

feather54.00kg 超 57.00kg 以下

light57.00kg 超 60.00kg 以下

light welter60.00kg 超 64.00kg 以下

welter64.00kg 超 69.00 kg 以下

light middle69.00kg 超 75.00 kg 以下

middle75.00kg 超 81.00 kg 以下

light heavy81.00kg 超 91.00 kg 以下

heavy91.00kg 超

Input

入力は複数のデータセットからなります。各データセットとして、体重を表す１つの実数 w (40 ≤ w ≤ 150) が１行に与えられます。データセットの数は 50 を超えません。

Output

データセットごとに、対応する階級を１行に出力します。

Sample Input

60.2
70.2
48.0
80.2

Output for the Sample Input

light welter
light middle
light fly
middle



Sample input:
60.2
70.2
48.0
80.2


Sample output:
light welter
light middle
light fly
middle

Submission status: Wrong Answer

Solution code:
a,b=['light fly', 'fly', 'bantam', 'feather', 'light', 'light welter','welter', 'light middle', 'middle', 'light heavy', 'heavy'],[48, 51, 54, 57, 60, 64, 69, 75, 81, 91]
while 1:
    try:
        c=float(input())
    except:break
    for i in range(10):
        if c<=b[i]:
            print(a[i])
            break

Submission status: Wrong Answer

Solution code:
import sys
f = sys.stdin



classes = {'light fly':(00.00, 48.00),
           'fly':(48.00, 51.00),
           'bantam':(51.00, 54.00),
           'feather':(54.00,57.00),
           'light':(57.00,60.00),
           'light welter':(60.00,64.00),
           'welter':(64.00,69.00),
           'light middle':(69.00,75.00),
           'middle':(75.00,81.00),
           'light heavy':(81.00,91.00),
           'heavy':(91.00,1000.00)}

for line in f:
    weight = float(line)
    for class_name, weights in classes.items():
        if weights[0] <= weight < weights[1]:
            print(class_name)
            break

Submission status: Wrong Answer

Solution code:
# coding: utf-8
from __future__ import print_function
from bisect import bisect

def grade(weight):
    return cls[bisect(bounds, weight)]

bounds = [48.001, 51.00, 54.00, 57.00, 60.00, 64.00, 69.00, 75.00, 81.00, 91.00]
cls = ["light fly", "fly", "bantam", "feather", "light", "light welter", "welter", "light middle", "middle", "light heavy", "heavy"]
weights = []
while True:
    try:
        w = float(raw_input())
        weights.append(w)
    except EOFError:
        break
map(print, map(grade, weights))

Submission status: Wrong Answer

Solution code:
# coding: utf-8
from __future__ import print_function
from bisect import bisect

def grade(weight):
    return cls[bisect(bounds, weight)]

bounds = [48.001, 51.001, 54.001, 57.001, 60.001, 64.001, 69.001, 75.001, 81.001, 91.001]
cls = ["light fly", "fly", "bantam", "feather", "light", "light welter", "welter", "light middle", "middle", "light heavy", "heavy"]
weights = []
while True:
    try:
        w = float(raw_input())
        weights.append(w)
    except EOFError:
        break
map(print, map(grade, weights))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

import sys

for line in sys.stdin:
    w = float(line)
    if w <= 48.00:
        print "light fly"
    elif w <= 51.00:
        print "fly"
    elif w <= 54.00:
        print "bantam"
    elif w <= 57.00:
        print "feather"
    elif w <= 60.00:
        print "light"
    elif w <= 64.00:
        print "light welterr"
    elif w <= 69.00:
        print "welter"
    elif w <= 75.00:
        print "light middle"
    elif w <= 81.00:
        print "middle"
    elif w <= 91.00:
        print "light heavy"
    else:
        print "heavy"

Submission status: Wrong Answer

Solution code:
while True:
    try:
        i = float(input())
        if i <= 48.0: print("light fly")
        elif i >= 48.1 and i <= 51.0: print("fly")
        elif i >= 51.1 and i <= 54.0: print("bantam")
        elif i >= 54.1 and i <= 57.0: print("feather")
        elif i >= 57.1 and i <= 60.0: print("light")
        elif i >= 60.1 and i <= 64.0: print("light welter")
        elif i >= 64.1 and i <= 69.0: print("welter")
        elif i >= 69.1 and i <= 75.0: print("light middle")
        elif i >= 75.1 and i <= 81.0: print("middle")
        elif i >= 81.1 and i <= 91.0: print("light heavy")
        else: print("heavy")
    except:
        break

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-


def judge_class(s):
    if s <= 48.00:
        return 'light fly'
    elif 48.00 < s <= 51.00:
        return 'fly'
    elif 51.00 < s <= 54.00:
        return 'bantam'
    elif 54.00 < s <= 57.00:
        return 'feather'
    elif 57.00 < s <= 60.00:
        return 'light'
    elif 60.00 < s <= 64.00:
        return 'light welter'
    elif 64.00 < s <= 69.00:
        return 'welter'
    elif 69.00 < s <= 75.00:
        return 'light middle'
    elif 75.00 < s <= 81.00:
        return 'middle'
    elif 81.00 < s <= 91.00:
        return 'light heavy'
    elif 91.00 <= s:
        return 'heavy'


if __name__ == '__main__':
    weight = float(input())
    print(judge_class(weight))

    # print(judge_class(60.2) == 'light welter')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-


def judge_class(s):
    if s <= 48.00:
        return 'light fly'
    elif 48.00 < s <= 51.00:
        return 'fly'
    elif 51.00 < s <= 54.00:
        return 'bantam'
    elif 54.00 < s <= 57.00:
        return 'feather'
    elif 57.00 < s <= 60.00:
        return 'light'
    elif 60.00 < s <= 64.00:
        return 'light welter'
    elif 64.00 < s <= 69.00:
        return 'welter'
    elif 69.00 < s <= 75.00:
        return 'light middle'
    elif 75.00 < s <= 81.00:
        return 'middle'
    elif 81.00 < s <= 91.00:
        return 'light heavy'
    elif 91.00 <= s:
        return 'heavy'


weight = float(input())
print(judge_class(weight))

Submission status: Wrong Answer

Solution code:
while True:
    try:
        d= float(input())
    except:
        break
    print("light fly" if d<=48 else ("fly" if d<=51 else ("bantam" if d<=54 else("feather" if d<=57 else("light" if d<=60 else("light welter" if d<=64 else("welter" if d<=69 else("light middle" if d<=75 else("middle" if d<=81 else("light heavt" if d<=91 else "heavy"))))))))))

Submission status: Wrong Answer

Solution code:
while True:
    try:
        d= float(input())
    except:
        break
    print("light fly" if d<=48 else \
         ("fly" if d<=51 else \
         ("bantam" if d<=54 else\
         ("feather" if d<=57 else\
         ("light" if d<=60 else\
         ("light welter" if d<=64 else\
         ("welter" if d<=69 else\
         ("light middle" if d<=75 else\
         ("middle" if d<=81 else("light heavt" if d<=91 else "heavy"))))))))))

Submission status: Wrong Answer

Solution code:
while True:
    try:
        d= float(input())
        print("light fly" if d<=48 else ("fly" if d<=51 else ("bantam" if d<=54 else("feather" if d<=57 else("light" if d<=60 else("light welter" if d<=64 else("welter" if d<=69 else("light middle" if d<=75 else("middle" if d<=81 else("light heavt" if d<=91 else "heavy"))))))))))
    except:
        break

Submission status: Wrong Answer

Solution code:
import sys
for e in sys.stdin:
 e=float(e)
 h=['light ','']
 a=h[e>91]+'heavy'if e>81 else h[e>75]+'middle'if e>69 else h[e>64]+'welter'if e>60 else'light'if e>57 else'feather'if e>51 else'bantam'if e>51 else h[e>48]+'fly'
 print(a)

Submission status: Wrong Answer

Solution code:
import bisect
w = [48, 51, 54, 57, 60, 64, 69, 75, 81, 91]
c = ["light fly", "fly", "bantam", "feather", "feather", "light welter", "welter", "light middle", "middle", "light heavy", "heavy"]
while 1:
    try:print(c[bisect.bisect_left(w,float(input()))])
    except:break

Submission status: Wrong Answer

Solution code:
import sys
WEIGHT=[91.0, 81.0, 75.0, 69.0, 64.0, 60.0, 57.0, 54.0, 51.0, 48.0,1]
GRADE=['heavy', 'light heavy', 'middle', 'light', 'welter', 'light welter', 'light', 'feather', 'bantam', 'fly', 'light fly']
for line in sys.stdin.readlines():
    weight=float(line.strip())
    for i in xrange(len(GRADE)):
        if weight/WEIGHT[i]>1:
            print GRADE[i]
            break

Submission status: Wrong Answer

Solution code:
import sys
WEIGHT=[91.0, 81.0, 75.0, 69.0, 64.0, 60.0, 57.0, 54.0, 51.0, 48.0,0.001]
GRADE=['heavy', 'light heavy', 'middle', 'light', 'welter', 'light welter', 'light', 'feather', 'bantam', 'fly', 'light fly']
for line in sys.stdin.readlines():
    weight=float(line.strip())
    for i in xrange(len(GRADE)):
        if weight/WEIGHT[i]>1:
            print GRADE[i]
            break

Submission status: Wrong Answer

Solution code:
import sys
WEIGHT=[91.0, 81.0, 75.0, 69.0, 64.0, 60.0, 57.0, 54.0, 51.0, 48.0,0.001]
GRADE=['heavy', 'light heavy', 'middle', 'light', 'welter', 'light welter', 'light', 'feather', 'bantam', 'fly', 'light fly']
for line in sys.stdin.readlines():
    weight=float(line.strip())
    for i in xrange(len(GRADE)):
        if weight/WEIGHT[i]>1:
            print GRADE[i]
            break
    if weight==0:print GRADE[-1]

Submission status: Wrong Answer

Solution code:
import sys
WEIGHT=[91.0, 81.0, 75.0, 69.0, 64.0, 60.0, 57.0, 54.0, 51.0, 48.0,-1]
GRADE=['heavy', 'light heavy', 'middle', 'light', 'welter', 'light welter', 'light', 'feather', 'bantam', 'fly', 'light fly']
for line in sys.stdin.readlines():
    weight=float(line.strip())
    for i in xrange(len(GRADE)):
        if weight>WEIGHT[i]:
            print GRADE[i]
            break

Submission status: Wrong Answer

Solution code:
import sys
WEIGHT=[91.0, 81.0, 75.0, 69.0, 64.0, 60.0, 57.0, 54.0, 51.0, 48.0,-1]
GRADE=['heavy', 'light heavy', 'middle', 'light', 'welter', 'light welter', 'light', 'feather', 
       'bantam', 'fly', 'light fly']
try:
    for line in sys.stdin.readlines():
        weight=float(line.strip())
        for i in xrange(len(GRADE)):
            if weight>WEIGHT[i]:
                print GRADE[i]
                break
except:
    pass

Submission status: Wrong Answer

Solution code:
def jug(a):
    if a <= 48.0:
        print "light fly"
    elif a <= 51.0:
        print "fly"
    elif a <= 45.0:
        print "bantam"
    elif a <= 57.0:
        print "feather"
    elif a <= 60.0:
        print "light"
    elif a <= 64.0:
        print "light welter"
    elif a <= 69.0:
        print 'welter'
    elif a <= 75.0:
        print "light middle"
    elif a <= 81.0:
        print "middle"
    elif a <= 91.0:
        print "light heavy"
    else:
        print "heavy"

while True:
    try:

        a = float(raw_input())
        jug(a)

    except EOFError:
        break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        w = float(raw_input())
        if w <= 48.0:
            print  "light fly"
        elif w <= 51.0:
            print "fly"
        elif w <= 54.0:
            print "bantam"
        elif w <= 57.0:
            print "feather"
        elif w <= 60:
            print "light"
        elif w <= 64.0:
            print "light welter"
        elif w <= 69.0:
            print "welter"
        elif w <= 75.0:
            print "light middle"
        elif w <= 81.0:
            print "light heavy"
        else:
            print "heavy"
    except:
        break

Submission status: Time Limit Exceeded

Solution code:
while True:
  try:
   w=float(input())
   if w<=48:
    judge='light fly'
   elif 48<=w<=51:
    judge='fly'
   elif 51<=w<=54:
    judge='bantam'
   elif 54<=w<=57:
    judge='feather'
   elif 57<=w<=60:
    judge='light'
   elif 60<=w<=64:
    judge='light welter'
   elif 64<=w<=69:
    judge='welter'
   elif 69<=w<=75:
    judge='light middle'
   elif 75<=w<=81:
    judge='middle'
   elif 81<=w<=91:
    judge='light heavy'
   else:
    judge='heavy'  
   print(judge)
  except:
   pass

Submission status: Accepted

Solution code:
while(True):
    try: s = float(input())
    except: break
    if 91.0<s : print("heavy"); continue
    if 81.0<s : print("light heavy"); continue
    if 75.0<s : print("middle"); continue
    if 69.0<s : print("light middle"); continue
    if 64.0<s : print("welter"); continue
    if 60.0<s : print("light welter"); continue
    if 57.0<s : print("light"); continue
    if 54.0<s : print("feather"); continue
    if 51.0<s : print("bantam"); continue
    if 48.0<s : print("fly"); continue
    print("light fly")

Submission status: Accepted

Solution code:
while 1:
    try:
        n=float(input())
        if n>91:
            print("heavy")
        elif n>81:
            print("light heavy")
        elif n>75:
            print("middle")
        elif n>69:
            print("light middle")
        elif n>64:
            print("welter")
        elif n>60:
            print("light welter")
        elif n>57:
            print("light")
        elif n>54:
            print("feather")
        elif n>51:
            print("bantam")
        elif n>48:
            print("fly")
        else:
            print("light fly")
    except:break

Submission status: Accepted

Solution code:
a,b=['light fly', 'fly', 'bantam', 'feather', 'light', 'light welter','welter', 'light middle', 'middle', 'light heavy', 'heavy'],[48, 51, 54, 57, 60, 64, 69, 75, 81, 91]
while 1:
    try:
        c=float(input())
    except:break
    for i in range(10):
        if c<=b[i]:
            print(a[i])
            break
    else: print(a[10])

Submission status: Accepted

Solution code:
while True:
    try:
        weight = float(input())

        if(weight <= 48.00):
            print("light fly")
        elif(weight <= 51.00):
            print("fly")
        elif(weight <= 54.00):
            print("bantam")
        elif(weight <= 57.00):
            print("feather")
        elif(weight <= 60.00):
            print("light")
        elif(weight <= 64.00):
            print("light welter")
        elif(weight <= 69.00):
            print("welter")
        elif(weight <= 75.00):
            print("light middle")
        elif(weight <= 81.00):
            print("middle")
        elif(weight <= 91.00):
            print("light heavy")
        else:
            print("heavy")
    except:
        break;

Submission status: Accepted

Solution code:
min = 40.00
max = 150.00

measure = [min, 48.00, 51.00, 54.00, 57.00, 60.00, 64.00, 69.00, 75.00, 81.00, 91.00, max]
className = ['light fly',
         'fly',
         'bantam',
         'feather',
         'light',
         'light welter',
         'welter',
         'light middle',
         'middle',
         'light heavy',
         'heavy']

while True:
    try:
        weight = float(input())
    except:
        break;
    for i in range(11):
        if(measure[i] < weight and weight <= measure[i + 1]):
            print(className[i])

Submission status: Accepted

Solution code:
# AOJ 0048
# Class
# 5/1/2019

min = 40.00
max = 150.00

measure = [min, 48.00, 51.00, 54.00, 57.00, 60.00, 64.00, 69.00, 75.00, 81.00, 91.00, max]
className = ['light fly',
         'fly',
         'bantam',
         'feather',
         'light',
         'light welter',
         'welter',
         'light middle',
         'middle',
         'light heavy',
         'heavy']

while True:
    try:
        weight = float(input())
    except:
        break;
    for i in range(11):
        if(measure[i] < weight and weight <= measure[i + 1]):
            print(className[i])

Submission status: Accepted

Solution code:
while True:
    try:
        w = float(input())
        if w <= 48:
            print('light fly')
        elif w <= 51:
            print('fly')
        elif w <= 54:
            print('bantam')
        elif w <= 57:
            print('feather')
        elif w <= 60:
            print('light')
        elif w <= 64:
            print('light welter')
        elif w <= 69:
            print('welter')
        elif w <= 75:
            print('light middle')
        elif w <= 81:
            print('middle')
        elif w <= 91:
            print('light heavy')
        else:
            print('heavy')
    except:
        break

Submission status: Accepted

Solution code:
from sys import *

for s in stdin:
    d = float(s)
    if d <= 48.0: print "light fly"; continue
    if d <= 51.0: print "fly"; continue
    if d <= 54.0: print "bantam"; continue
    if d <= 57.0: print "feather"; continue
    if d <= 60.0: print "light"; continue
    if d <= 64.0: print "light welter"; continue
    if d <= 69.0: print "welter"; continue
    if d <= 75.0: print "light middle"; continue
    if d <= 81.0: print "middle"; continue
    if d <= 91.0: print "light heavy"; continue
    print "heavy"

Submission status: Accepted

Solution code:
import sys
f = sys.stdin


classes = {'light fly':(00.00, 48.00),
           'fly':(48.00, 51.00),
           'bantam':(51.00, 54.00),
           'feather':(54.00,57.00),
           'light':(57.00,60.00),
           'light welter':(60.00,64.00),
           'welter':(64.00,69.00),
           'light middle':(69.00,75.00),
           'middle':(75.00,81.00),
           'light heavy':(81.00,91.00),
           'heavy':(91.00,1000.00)}

for line in f:
    weight = float(line)
    for class_name, weights in classes.items():
        if weights[0] < weight <= weights[1]:
            print(class_name)
            break

Submission status: Accepted

Solution code:
while True:
    try:
        n = float(input())
    except:
        break

    if n <= 48:
        print("light fly")
    elif n > 48 and n <= 51:
        print("fly")
    elif n > 51 and n <= 54:
        print("bantam")
    elif n > 54 and n <= 57:
        print("feather")
    elif n > 57 and n <= 60:
        print("light")
    elif n > 60 and n <= 64:
        print("light welter")
    elif n > 64 and n <= 69:
        print("welter")
    elif n > 69 and n <= 75:
        print("light middle")
    elif n > 75 and n <= 81:
        print("middle")
    elif n > 81 and n <= 91:
        print("light heavy")
    else:
        print("heavy")

Submission status: Accepted

Solution code:
while True:
    try:
        weight=input()
        if weight<=48.00:
            print "light fly"
        elif weight>91.00:
            print "heavy"
        else:
            if weight<=51.00:
                print "fly"
            elif weight<=54.00:
                print "bantam"
            elif weight<=57.00:
                print "feather"
            elif weight<=60.00:
                print "light"
            elif weight<=64.00:
                print "light welter"
            elif weight<=69.00:
                print "welter"
            elif weight<=75.00:
                print "light middle"
            elif weight<=81.00:
                print "middle"
            else:
                print "light heavy"
    except:
        break

Submission status: Accepted

Solution code:
while True:
    try:
        weight = float(raw_input())
        if weight <= 48.00:
            print 'light fly'
        elif 48.00 < weight <= 51.00:
            print 'fly'
        elif 51.00 < weight <= 54.00:
            print 'bantam'
        elif 54.00 < weight <= 57.00:
            print 'feather'
        elif 57.00 < weight <= 60.00:
            print 'light'
        elif 60.00 < weight <= 64.00:
            print 'light welter'
        elif 64.00 < weight <= 69.00:
            print 'welter'
        elif 69.00 < weight <= 75.00:
            print 'light middle'
        elif 75.00 < weight <= 81.00:
            print 'middle'
        elif 81.00 < weight <= 91.00:
            print 'light heavy'
        elif 91.00 < weight:
            print 'heavy'
    except EOFError:
        break

Submission status: Accepted

Solution code:
while 1:
    try:
        i=float(raw_input())
        if i<=48.00:
            print "light fly"
        elif i<=51.00:
            print "fly"
        elif i<=54.00:
            print "bantam"
        elif i<=57.00:
            print "feather"
        elif i<=60.00:
            print "light"
        elif i<=64.00:
            print "light welter"
        elif i<=69.00:
            print "welter"
        elif i<=75.00:
            print "light middle"
        elif i<=81.00:
            print "middle"
        elif i<=91.00:
            print "light heavy"
        else:
            print "heavy"
    except:
        break

Submission status: Accepted

Solution code:
import sys
a,b,o,ab = 0,0,0,0
for line in sys.stdin.readlines():
  w = float(line)
  if w <= 48:
    print('light fly')
  elif 48 < w <= 51:
    print('fly')
  elif 51 < w <= 54:
    print('bantam')
  elif 54 < w <= 57:
    print('feather')
  elif 57 < w <= 60:
    print('light')
  elif 60 < w <= 64:
    print('light welter')
  elif 64 < w <= 69:
    print('welter')
  elif 69 < w <= 75:
    print('light middle')
  elif 75 < w <= 81:
    print('middle')
  elif 81 < w <= 91:
    print('light heavy')
  else:
    print('heavy')

Submission status: Accepted

Solution code:
def Class(x):
	if x<=48.0:
		print("light fly")
	elif 48.0<x<=51.0:
		print("fly")
	elif 51.0<x<=54.0:
		print("bantam")
	elif 54.0<x<=57.0:
		print("feather")
	elif 57.0<x<=60.0:
		print("light")
	elif 60.0<x<=64.0:
		print("light welter")
	elif 64.0<x<=69.0:
		print("welter")
	elif 69.0<x<=75.0:
		print("light middle")
	elif 75.0<x<=81.0:
		print("middle")
	elif 81.0<x<=91.0:
		print("light heavy")
	else:
		print("heavy")

while True:
	try:
		x=float(input())
		Class(x)
	except EOFError:
		break

Submission status: Accepted

Solution code:
import sys
for line in sys.stdin:
    if float(line) <= 48.00: print "light fly"
    elif 48.0 < float(line) <= 51.0: print "fly"
    elif 51.0 < float(line) <= 54.0: print "bantam"
    elif 54.0 < float(line) <= 57.0: print "feather"
    elif 57.0 < float(line) <= 60.0: print "light"
    elif 60.0 < float(line) <= 64.0: print "light welter"
    elif 64.0 < float(line) <= 69.0: print "welter"
    elif 69.0 < float(line) <= 75.0: print "light middle"
    elif 75.0 < float(line) <= 81.0: print "middle"
    elif 81.0 < float(line) <= 91.0: print "light heavy"
    else:print "heavy"

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys

for line in sys.stdin:
    w = float(line)
    if w <= 48.00:
        print "light fly"
    elif w <= 51.00:
        print "fly"
    elif w <= 54.00:
        print "bantam"
    elif w <= 57.00:
        print "feather"
    elif w <= 60.00:
        print "light"
    elif w <= 64.00:
        print "light welter"
    elif w <= 69.00:
        print "welter"
    elif w <= 75.00:
        print "light middle"
    elif w <= 81.00:
        print "middle"
    elif w <= 91.00:
        print "light heavy"
    else:
        print "heavy"

Submission status: Accepted

Solution code:
import sys
for i in sys.stdin:
    n = float(i)
    if n <= 48:
        print("light fly")
    elif n <= 51:
        print("fly")
    elif n <= 54:
        print("bantam")
    elif n <= 57:
        print("feather")
    elif n <= 60:
        print("light")
    elif n <= 64:
        print("light welter")
    elif n <= 69:
        print("welter")
    elif n <= 75:
        print("light middle")
    elif n <= 81:
        print("middle")
    elif n <= 91:
        print("light heavy")
    else:
        print("heavy")

Submission status: Accepted

Solution code:
while True:
    try:
        i = float(input())
        if i <= 48.0: print("light fly")
        elif i <= 51.0: print("fly")
        elif i <= 54.0: print("bantam")
        elif i <= 57.0: print("feather")
        elif i <= 60.0: print("light")
        elif i <= 64.0: print("light welter")
        elif i <= 69.0: print("welter")
        elif i <= 75.0: print("light middle")
        elif i <= 81.0: print("middle")
        elif i <= 91.0: print("light heavy")
        else: print("heavy")
    except:
        break

Submission status: Accepted

Solution code:
name = ['light fly', 'fly', 'bantam', 'feather', 'light', 'light welter',
        'welter', 'light middle', 'middle', 'light heavy', 'heavy']
ws = [48, 51, 54, 57, 60, 64, 69, 75, 81, 91]
while True:
    try:
        w = float(input())
    except:
        break
    for i in range(10):
        if w <= ws[i]:
            print(name[i])
            break
    else:
        print(name[10])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def judge_class(s):
    if s <= 48.00:
        return 'light fly'
    elif 48.00 < s <= 51.00:
        return 'fly'
    elif 51.00 < s <= 54.00:
        return 'bantam'
    elif 54.00 < s <= 57.00:
        return 'feather'
    elif 57.00 < s <= 60.00:
        return 'light'
    elif 60.00 < s <= 64.00:
        return 'light welter'
    elif 64.00 < s <= 69.00:
        return 'welter'
    elif 69.00 < s <= 75.00:
        return 'light middle'
    elif 75.00 < s <= 81.00:
        return 'middle'
    elif 81.00 < s <= 91.00:
        return 'light heavy'
    elif 91.00 <= s:
        return 'heavy'


while True:
    try:
        weight = float(input())
        print(judge_class(weight))
    except:
        break

Submission status: Accepted

Solution code:
while True:
    try:
        W = float(input())
        if W <= 48:
            print("light fly")
        elif W <= 51:
            print("fly")
        elif W <= 54:
            print("bantam")
        elif W <= 57:
            print("feather")
        elif W <= 60:
            print("light")
        elif W <= 64:
            print("light welter")
        elif W <= 69:
            print("welter")
        elif W <= 75:
            print("light middle")
        elif W <= 81:
            print("middle")
        elif W <= 91:
            print("light heavy")
        else:
            print("heavy")
    except EOFError:
        break

Submission status: Accepted

Solution code:
level=["heavy","light heavy","middle","light middle","welter","light welter","light","feather","bantam","fly"]
weight=[91,81,75,69,64,60,57,54,51,48]
while True:
    try:
        w=float(input())
    except:
        break
    f=False
    for wei,lev in zip(weight,level):
        if w>wei:
            print(lev)
            f=True
            break
    if not f:
        print("light fly")

Submission status: Accepted

Solution code:
level=["heavy","light heavy","middle","light middle","welter",
"light welter","light","feather","bantam","fly"]
weight=[91,81,75,69,64,60,57,54,51,48]
while True:
    try:
        w=float(input())
    except:
        break
    f=False
    for wei,lev in zip(weight,level):
        if w>wei:
            print(lev)
            f=True
            break
    if not f:
        print("light fly")

Submission status: Accepted

Solution code:
a,b=['light fly', 'fly', 'bantam', 'feather', 'light', 'light welter','welter', 'light middle', 'middle', 'light heavy', 'heavy'],[48, 51, 54, 57, 60, 64, 69, 75, 81, 91]
while 1:
    try:
        c=float(input())
    except:break
    for i in range(10):
        if c<=b[i]:
            print(a[i])
            break
    else: print(a[10])

Submission status: Accepted

Solution code:
d={48:'light fly',51:'fly',54:'bantam',57:'feather',60:'light',64:'light welter',69:'welter',75:'light middle',81:'middle',91:'light heavy'}
while True:
    try:
        w=float(input())
    except:
        break
    for k,v in sorted(d.items()):
        if w<=k:
            print(d[k])
            break
    else:
        print("heavy")

Submission status: Accepted

Solution code:
def weigh(w):
    if w <= 48.0:
        print('light fly')
    elif w > 48.0 and w <= 51.0:
        print('fly')
    elif w > 51.0 and w <= 54.0:
        print('bantam')
    elif w > 54.0 and w <= 57.0:
        print('feather')
    elif w > 57.0 and w <= 60.0:
        print('light')
    elif w > 60.0 and w <= 64.0:
        print('light welter')
    elif w > 64.0 and w <= 69.0:
        print('welter')
    elif w > 69.0 and w <= 75.0:
        print('light middle')
    elif w > 75.0 and w <= 81.0:
        print('middle')
    elif w > 81.0 and w <= 91.0:
        print('light heavy')
    else:
        print('heavy')
    return 0

d = []
while True:
    try:
        d.append(float(input()))
    except EOFError:
        break

for i in range(len(d)):
    weigh(d[i])

Submission status: Accepted

Solution code:
rank = ['heavy','light heavy','middle','light middle','welter','light welter','light','feather','bantam','fly','light fly']
lwgt=[91.00,81.00,75.00,69.00,64.00,60.00,57.00,54.00,51.00,48.00,0.0]
while True:
    try:
        wgt = float(input().strip())
        for i in range(len(lwgt)):
            if  wgt > lwgt[i]:
                print(rank[i])
                break
        
    except EOFError:
        break

Submission status: Accepted

Solution code:
while True:
    try:
        N = float(input())
    except EOFError:
        break
    if N <= 48.0:
        print('light fly')
    elif N <= 51.0:
        print('fly')
    elif N <= 54.0:
        print('bantam')
    elif N <= 57.0:
        print('feather')
    elif N <= 60.0:
        print('light')
    elif N <= 64.0:
        print('light welter')
    elif N <= 69.0:
        print('welter')
    elif N <= 75.0:
        print('light middle')
    elif N <= 81.0:
        print('middle')
    elif N <= 91.0:
        print('light heavy')
    else:
        print('heavy')

Submission status: Accepted

Solution code:
classes = ["light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"]
border = [48,51,54,57,60,64,69,75,81,91]

while True:
    try:
        w = float(input())
        for i in range(len(border)):
            if w <= border[i]:
                print(classes[i])
                break
        else: print(classes[-1])
    except EOFError: break

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys
import os
import math
import itertools

for s in sys.stdin:
    w = float(s)

    if w <= 48:
        print('light fly')
    elif w <= 51:
        print('fly')
    elif w <= 54:
        print('bantam')
    elif w <= 57:
        print('feather')
    elif w <= 60:
        print('light')
    elif w <= 64:
        print('light welter')
    elif w <= 69:
        print('welter')
    elif w <= 75:
        print('light middle')
    elif w <= 81:
        print('middle')
    elif w <= 91:
        print('light heavy')
    else:
        print('heavy')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""

"""
import sys
from datetime import datetime
from time import perf_counter


def identify_class(weight):
    if weight <= 48.0:
        return 'light fly'
    elif weight <= 51.0:
        return 'fly'
    elif weight <= 54.0:
        return 'bantam'
    elif weight <= 57.0:
        return 'feather'
    elif weight <= 60.0:
        return 'light'
    elif weight <= 64.0:
        return 'light welter'
    elif weight <= 69.0:
        return 'welter'
    elif weight <= 75.0:
        return 'light middle'
    elif weight <= 81.0:
        return 'middle'
    elif weight <= 91.0:
        return 'light heavy'
    else:
        return 'heavy'


def main(args):
    for line in sys.stdin:  # ??????????????\???
        weight = float(line.strip())
        boxing_class = identify_class(weight)
        print(boxing_class)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
def check(weight):
    if weight <= 60.00 :
        if weight <= 51.00 :
            if weight <= 48.00 : print('light fly') 
            else : print('fly')
        elif 54.00 < weight :
            if weight <= 57.00 : print('feather')
            else : print('light')
        else : print('bantam')
    elif 64.00 < weight  :
        if weight <= 75.00 :
            if weight <= 69.00 : print('welter')
            else : print('light middle')
        elif 81.00 < weight :
            if weight <= 91.00 : print('light heavy')
            else : print('heavy')
        else : print('middle')
    else : print('light welter')
    
while True :
    try    : check(float(input()))
    except : break