結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー rocoder
提出日時 2017-06-11 11:02:37
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 1,000 ms
コード長 521 bytes
コンパイル時間 183 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-25 23:32:07
合計ジャッジ時間 2,254 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

# your code goes here
K0=int(input())
def pr (l):
    if l==2:
        return 1
    elif l==3:
        return 1
    elif l==5:
        return 1
    elif l==7:
        return 1
    elif l==11:
        return 1
    elif l==13:
        return 1
    else:
        return 0
def dc(K):
    i=4
    C=0
    while i<=12:
        if K%i==0:
            if pr(K//i)==1:
                C+=1
        if i==8 or i==9:
            i+=1
        else:
           i+=2
    return C
#K=input()
K0=int(K0)
dic=dc(K0)
pr=dc(K0)/36
print(pr)
0