AtCoder Beginner Contest 001

Submission #4293877

Source codeソースコード

def deg(x):
    if x>=112.5 and x<337.5:
        return('NNE')
    elif x>=337.5 and x<562.5:
        return('NE')
    elif x>=562.5 and x<787.5:
        return('ENE')
    elif x>=787.5 and x<1012.5:
        return('E')
    elif x>=1012.5 and x<1237.5:
        return('ESE')
    elif x>=1237.5 and x<1462.5:
        return('SE')
    elif x>=1462.5 and x<1687.5:
        return('SSE')
    elif x>=1687.5 and x<1912.5:
        return('S')
    elif x>=1912.5 and x<2137.5:
        return('SSW')
    elif x>=2137.5 and x<2362.5:
        return('SW')
    elif x>=2362.5 and x<2587.5:
        return('WSW')
    elif x>=2587.5 and x<2812.5:
        return('W')
    elif x>=2812.5 and x<3037.5:
        return('WNW')
    elif x>=3037.5 and x<3262.5:
        return('NW')
    elif x>=3262.5 and x<3487.5:
        return('NNW')
    else:
        return('N')

def dis(y):
    y = y/60
    if y>=0 and y<=0.2:
        return(0)
    elif y>=0.3 and y<=1.5:
        return(1)
    elif y>=1.6 and y<=3.3:
        return(2)
    elif y>=3.4 and y<=5.4:
        return(3)
    elif y>=5.5 and y<=7.9:
        return(4)
    elif y>=8.0 and y<=10.7:
        return(5)
    elif y>=10.8 and y<=13.8:
        return(6)
    elif y>=13.9 and y<=17.1:
        return(7)
    elif y>=17.2 and y<=20.7:
        return(8)
    elif y>=20.8 and y<=24.4:
        return(9)
    elif y>=24.5 and y<=28.4:
        return(10)
    elif y>=28.5 and y<=32.6:
        return(11)
    elif y>=32.7:
        return(12)
    else:
        return()

def main():
    print('Deg is 0 ~ 3600')
    Deg = int(input())
    print('Dis is 0 ~ 12000')
    Dis = int(input())
    if dis(Dis)==0:
        print('C 0')
    else:
        print('{} {}'.format(deg(Deg),dis(Dis)))

if __name__ == "__main__":
    main()

Submission

Task問題 C - 風力観測
User nameユーザ名 keroido2321
Created time投稿日時
Language言語 Python3 (3.4.3)
Status状態 RE
Score得点 0
Source lengthソースコード長 1837 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Test case

Set

Set name Score得点 / Max score Cases
all 0 / 100 00_sample_01.txt,00_sample_02.txt,00_sample_03.txt,00_sample_04.txt,00_sample_05.txt,00_sample_06.txt,00_sample_07.txt,00_sample_08.txt,test_01.txt,test_02.txt,test_03.txt,test_04.txt,test_05.txt,test_06.txt,test_07.txt,test_08.txt,test_09.txt,test_10.txt,test_11.txt,test_12.txt,test_13.txt,test_14.txt,test_15.txt,test_16.txt,test_17.txt,test_18.txt,test_19.txt,test_20.txt,test_21.txt,test_22.txt,test_23.txt,test_24.txt,test_25.txt,test_26.txt,test_27.txt,test_28.txt,test_29.txt,test_30.txt,test_31.txt,test_32.txt,test_33.txt,test_34.txt,test_35.txt,test_36.txt,test_37.txt,test_38.txt,test_39.txt,test_40.txt,test_41.txt,test_42.txt,test_43.txt,test_44.txt,test_45.txt,test_46.txt,test_47.txt,test_48.txt,test_49.txt,test_50.txt,test_51.txt,test_52.txt,test_53.txt,test_54.txt,test_55.txt,test_56.txt,test_57.txt,test_58.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
00_sample_01.txt RE
00_sample_02.txt RE
00_sample_03.txt RE
00_sample_04.txt RE
00_sample_05.txt RE
00_sample_06.txt RE
00_sample_07.txt RE
00_sample_08.txt RE
test_01.txt RE
test_02.txt RE
test_03.txt RE
test_04.txt RE
test_05.txt RE
test_06.txt RE
test_07.txt RE
test_08.txt RE
test_09.txt RE
test_10.txt RE
test_11.txt RE
test_12.txt RE
test_13.txt RE
test_14.txt RE
test_15.txt RE
test_16.txt RE
test_17.txt RE
test_18.txt RE
test_19.txt RE
test_20.txt RE
test_21.txt RE
test_22.txt RE
test_23.txt RE
test_24.txt RE
test_25.txt RE
test_26.txt RE
test_27.txt RE
test_28.txt RE
test_29.txt RE
test_30.txt RE
test_31.txt RE
test_32.txt RE
test_33.txt RE
test_34.txt RE
test_35.txt RE
test_36.txt RE
test_37.txt RE
test_38.txt RE
test_39.txt RE
test_40.txt RE
test_41.txt RE
test_42.txt RE
test_43.txt RE
test_44.txt RE
test_45.txt RE
test_46.txt RE
test_47.txt RE
test_48.txt RE
test_49.txt RE
test_50.txt RE
test_51.txt RE
test_52.txt RE
test_53.txt RE
test_54.txt RE
test_55.txt RE
test_56.txt RE
test_57.txt RE
test_58.txt RE