Submission #16498721


Source Code Expand

Copy
n = int(input())
ans = 0
for i in range(1, int(n**0.5)+1):
    if n % i == 0:
        if i**2 == n:
            ans += i
        else:
            ans += i+n//i
if ans > n*2:
    print("Abundant")
elif ans < n*2:
    print("Deficient")
else:
    print("Perfect")

Submission Info

Submission Time
Task B - 完全数
User osma
Language Python (3.8.2)
Score 100
Code Size 275 Byte
Status AC
Exec Time 38 ms
Memory 9444 KB

Judge Result

Set Name Sample Subtask1 Subtask2
Score / Max Score 0 / 0 50 / 50 50 / 50
Status
AC × 4
AC × 28
AC × 49
Set Name Test Cases
Sample sample_1.txt, sample_2.txt, sample_3.txt, sample_4.txt
Subtask1 sample_1.txt, sample_2.txt, sample_3.txt, sample_4.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_16.txt, subtask1_17.txt, subtask1_18.txt, subtask1_19.txt, subtask1_20.txt, subtask1_21.txt, subtask1_22.txt, subtask1_23.txt, subtask1_24.txt
Subtask2 sample_1.txt, sample_2.txt, sample_3.txt, sample_4.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_16.txt, subtask1_17.txt, subtask1_18.txt, subtask1_19.txt, subtask1_20.txt, subtask1_21.txt, subtask1_22.txt, subtask1_23.txt, subtask1_24.txt, subtask2_01.txt, subtask2_02.txt, subtask2_03.txt, subtask2_04.txt, subtask2_05.txt, subtask2_06.txt, subtask2_07.txt, subtask2_08.txt, subtask2_09.txt, subtask2_10.txt, subtask2_11.txt, subtask2_12.txt, subtask2_13.txt, subtask2_14.txt, subtask2_15.txt, subtask2_16.txt, subtask2_17.txt, subtask2_18.txt, subtask2_19.txt, subtask2_20.txt, subtask2_21.txt
Case Name Status Exec Time Memory
sample_1.txt AC 31 ms 9116 KB
sample_2.txt AC 20 ms 9300 KB
sample_3.txt AC 19 ms 9232 KB
sample_4.txt AC 26 ms 9124 KB
subtask1_01.txt AC 18 ms 9132 KB
subtask1_02.txt AC 18 ms 9420 KB
subtask1_03.txt AC 18 ms 9288 KB
subtask1_04.txt AC 18 ms 9132 KB
subtask1_05.txt AC 23 ms 9360 KB
subtask1_06.txt AC 20 ms 9356 KB
subtask1_07.txt AC 18 ms 9224 KB
subtask1_08.txt AC 20 ms 9300 KB
subtask1_09.txt AC 21 ms 9136 KB
subtask1_10.txt AC 21 ms 9416 KB
subtask1_11.txt AC 18 ms 9300 KB
subtask1_12.txt AC 21 ms 9236 KB
subtask1_13.txt AC 23 ms 9128 KB
subtask1_14.txt AC 20 ms 9220 KB
subtask1_15.txt AC 19 ms 9136 KB
subtask1_16.txt AC 25 ms 9292 KB
subtask1_17.txt AC 20 ms 9308 KB
subtask1_18.txt AC 20 ms 9288 KB
subtask1_19.txt AC 18 ms 9444 KB
subtask1_20.txt AC 25 ms 9304 KB
subtask1_21.txt AC 21 ms 9416 KB
subtask1_22.txt AC 21 ms 9228 KB
subtask1_23.txt AC 18 ms 9128 KB
subtask1_24.txt AC 19 ms 9028 KB
subtask2_01.txt AC 21 ms 9128 KB
subtask2_02.txt AC 28 ms 9124 KB
subtask2_03.txt AC 35 ms 9128 KB
subtask2_04.txt AC 23 ms 9136 KB
subtask2_05.txt AC 27 ms 9232 KB
subtask2_06.txt AC 18 ms 9300 KB
subtask2_07.txt AC 24 ms 9356 KB
subtask2_08.txt AC 37 ms 9124 KB
subtask2_09.txt AC 31 ms 9120 KB
subtask2_10.txt AC 38 ms 9288 KB
subtask2_11.txt AC 19 ms 9176 KB
subtask2_12.txt AC 27 ms 9124 KB
subtask2_13.txt AC 32 ms 9420 KB
subtask2_14.txt AC 27 ms 9284 KB
subtask2_15.txt AC 33 ms 9420 KB
subtask2_16.txt AC 22 ms 9424 KB
subtask2_17.txt AC 37 ms 9300 KB
subtask2_18.txt AC 23 ms 9132 KB
subtask2_19.txt AC 30 ms 9124 KB
subtask2_20.txt AC 29 ms 9132 KB
subtask2_21.txt AC 19 ms 9224 KB