結果

問題 No.358 も~っと!門松列
ユーザー rocoderrocoder
提出日時 2017-06-17 19:44:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 482 bytes
コンパイル時間 208 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 23,592 KB
最終ジャッジ日時 2024-04-08 20:32:59
合計ジャッジ時間 4,512 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#Kadomore
#import math
def ka(b,c,d):
    if b<c and c>d:
        return 1
    elif b>c and c<d:
        return 1
    else:
        return 0
a=[int(i) for i in input().split()]
if ka(a[0],a[1],a[2])==1:
    print(INF)
else:
    b=[0]*3
    p=1
    c=0
    M=a[0]
    i=1
    while i<3:
        if M<a[i]:
            M=a[i]
        i+=1
    while p<=M+1:
#math.sqrt()
        for i in range(3):
            b[i]=a[i]%p
        if ka(b[0],b[1],b[2])==1:
            c+=1
    print(c)
0