結果

問題 No.826 連絡網
ユーザー O2MTO2MT
提出日時 2020-12-12 23:30:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 152 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 83,076 KB
最終ジャッジ日時 2023-10-20 02:47:01
合計ジャッジ時間 3,658 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,424 KB
testcase_01 AC 40 ms
53,424 KB
testcase_02 AC 45 ms
59,956 KB
testcase_03 AC 48 ms
60,116 KB
testcase_04 AC 47 ms
60,116 KB
testcase_05 AC 46 ms
59,988 KB
testcase_06 AC 48 ms
60,116 KB
testcase_07 AC 46 ms
60,116 KB
testcase_08 AC 46 ms
59,988 KB
testcase_09 AC 47 ms
60,116 KB
testcase_10 AC 44 ms
59,956 KB
testcase_11 AC 48 ms
60,116 KB
testcase_12 AC 116 ms
80,920 KB
testcase_13 AC 71 ms
74,648 KB
testcase_14 AC 99 ms
79,484 KB
testcase_15 AC 53 ms
62,660 KB
testcase_16 AC 78 ms
76,532 KB
testcase_17 AC 72 ms
74,656 KB
testcase_18 AC 65 ms
72,112 KB
testcase_19 AC 128 ms
81,804 KB
testcase_20 AC 125 ms
81,696 KB
testcase_21 AC 47 ms
60,116 KB
testcase_22 AC 73 ms
74,684 KB
testcase_23 AC 82 ms
78,140 KB
testcase_24 AC 59 ms
67,540 KB
testcase_25 AC 152 ms
83,048 KB
testcase_26 AC 63 ms
69,840 KB
testcase_27 AC 118 ms
81,108 KB
testcase_28 AC 100 ms
79,760 KB
testcase_29 AC 70 ms
74,632 KB
testcase_30 AC 152 ms
83,076 KB
testcase_31 AC 78 ms
75,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,P = map(int,input().split())
l = [0]*(N+1)
for i in range(2,N+1):
    for j in range(i,N+1,i):
        l[j] += 1
count = N-1
for n in range(N//2+1,N+1):
    if l[n] == 1:
        count -= 1
if l[P] == 1 and P > N//2:
    print(1)
else:
    print(count)
0