結果

問題 No.634 硬貨の枚数1
ユーザー 👑 KazunKazun
提出日時 2021-04-14 02:30:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 106 ms / 2,000 ms
コード長 269 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 87,024 KB
実行使用メモリ 76,624 KB
最終ジャッジ日時 2023-09-12 15:52:59
合計ジャッジ時間 9,526 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,140 KB
testcase_01 AC 71 ms
71,316 KB
testcase_02 AC 70 ms
71,328 KB
testcase_03 AC 78 ms
75,708 KB
testcase_04 AC 75 ms
75,696 KB
testcase_05 AC 72 ms
71,252 KB
testcase_06 AC 75 ms
75,632 KB
testcase_07 AC 74 ms
75,700 KB
testcase_08 AC 76 ms
75,768 KB
testcase_09 AC 72 ms
71,460 KB
testcase_10 AC 75 ms
75,452 KB
testcase_11 AC 73 ms
75,644 KB
testcase_12 AC 73 ms
75,632 KB
testcase_13 AC 75 ms
75,512 KB
testcase_14 AC 82 ms
76,228 KB
testcase_15 AC 96 ms
76,488 KB
testcase_16 AC 86 ms
76,232 KB
testcase_17 AC 89 ms
76,560 KB
testcase_18 AC 85 ms
76,232 KB
testcase_19 AC 81 ms
76,444 KB
testcase_20 AC 86 ms
76,536 KB
testcase_21 AC 100 ms
76,568 KB
testcase_22 AC 98 ms
76,568 KB
testcase_23 AC 85 ms
76,556 KB
testcase_24 AC 73 ms
75,508 KB
testcase_25 AC 74 ms
75,600 KB
testcase_26 AC 72 ms
75,540 KB
testcase_27 AC 73 ms
75,744 KB
testcase_28 AC 74 ms
75,552 KB
testcase_29 AC 74 ms
75,680 KB
testcase_30 AC 76 ms
75,660 KB
testcase_31 AC 74 ms
75,680 KB
testcase_32 AC 74 ms
75,748 KB
testcase_33 AC 73 ms
75,652 KB
testcase_34 AC 79 ms
76,532 KB
testcase_35 AC 85 ms
76,340 KB
testcase_36 AC 90 ms
76,484 KB
testcase_37 AC 87 ms
76,348 KB
testcase_38 AC 80 ms
76,228 KB
testcase_39 AC 96 ms
76,024 KB
testcase_40 AC 89 ms
76,228 KB
testcase_41 AC 90 ms
76,024 KB
testcase_42 AC 96 ms
76,364 KB
testcase_43 AC 87 ms
76,272 KB
testcase_44 AC 72 ms
71,568 KB
testcase_45 AC 76 ms
76,188 KB
testcase_46 AC 80 ms
76,336 KB
testcase_47 AC 97 ms
76,484 KB
testcase_48 AC 71 ms
71,000 KB
testcase_49 AC 77 ms
76,244 KB
testcase_50 AC 106 ms
76,172 KB
testcase_51 AC 82 ms
76,528 KB
testcase_52 AC 71 ms
71,324 KB
testcase_53 AC 69 ms
71,176 KB
testcase_54 AC 71 ms
71,264 KB
testcase_55 AC 100 ms
76,492 KB
testcase_56 AC 100 ms
76,360 KB
testcase_57 AC 100 ms
76,536 KB
testcase_58 AC 100 ms
76,228 KB
testcase_59 AC 99 ms
76,480 KB
testcase_60 AC 99 ms
76,452 KB
testcase_61 AC 100 ms
76,340 KB
testcase_62 AC 100 ms
76,492 KB
testcase_63 AC 100 ms
76,424 KB
testcase_64 AC 100 ms
76,484 KB
testcase_65 AC 99 ms
76,340 KB
testcase_66 AC 98 ms
76,400 KB
testcase_67 AC 99 ms
76,452 KB
testcase_68 AC 101 ms
76,496 KB
testcase_69 AC 99 ms
76,240 KB
testcase_70 AC 101 ms
76,232 KB
testcase_71 AC 101 ms
76,624 KB
testcase_72 AC 101 ms
76,300 KB
testcase_73 AC 102 ms
76,228 KB
testcase_74 AC 101 ms
76,172 KB
testcase_75 AC 99 ms
76,272 KB
testcase_76 AC 76 ms
75,752 KB
testcase_77 AC 74 ms
75,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())

X=[]
k=1
while True:
    y=k*(k+1)//2
    if y>N:
        break
    k+=1
    X.append(y)

if N in X:
    print(1)
    exit()

L=len(X)
for i in range(L):
    for j in range(i,L):
        if X[i]+X[j]==N:
            print(2)
            exit()

print(3)
0