結果

問題 No.634 硬貨の枚数1
ユーザー Coki628Coki628
提出日時 2020-09-03 21:20:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 902 bytes
コンパイル時間 962 ms
コンパイル使用メモリ 87,320 KB
実行使用メモリ 76,708 KB
最終ジャッジ日時 2023-08-15 18:04:33
合計ジャッジ時間 10,222 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,624 KB
testcase_01 AC 75 ms
71,716 KB
testcase_02 AC 77 ms
75,748 KB
testcase_03 AC 80 ms
76,016 KB
testcase_04 AC 80 ms
75,880 KB
testcase_05 AC 78 ms
71,416 KB
testcase_06 AC 81 ms
76,188 KB
testcase_07 AC 78 ms
75,792 KB
testcase_08 AC 79 ms
75,736 KB
testcase_09 AC 77 ms
71,792 KB
testcase_10 AC 80 ms
75,732 KB
testcase_11 AC 76 ms
75,736 KB
testcase_12 AC 75 ms
75,980 KB
testcase_13 AC 76 ms
75,916 KB
testcase_14 AC 82 ms
76,364 KB
testcase_15 AC 111 ms
76,456 KB
testcase_16 AC 93 ms
76,388 KB
testcase_17 AC 97 ms
76,568 KB
testcase_18 AC 95 ms
76,480 KB
testcase_19 AC 84 ms
76,236 KB
testcase_20 AC 86 ms
76,380 KB
testcase_21 AC 115 ms
76,496 KB
testcase_22 AC 111 ms
76,292 KB
testcase_23 AC 95 ms
76,476 KB
testcase_24 AC 78 ms
75,964 KB
testcase_25 AC 77 ms
75,816 KB
testcase_26 AC 77 ms
76,052 KB
testcase_27 AC 77 ms
75,816 KB
testcase_28 AC 78 ms
75,892 KB
testcase_29 AC 80 ms
75,880 KB
testcase_30 AC 78 ms
75,984 KB
testcase_31 AC 78 ms
76,012 KB
testcase_32 AC 76 ms
75,916 KB
testcase_33 AC 75 ms
75,984 KB
testcase_34 AC 82 ms
76,476 KB
testcase_35 AC 89 ms
76,576 KB
testcase_36 AC 102 ms
76,296 KB
testcase_37 AC 93 ms
76,176 KB
testcase_38 AC 82 ms
76,368 KB
testcase_39 AC 109 ms
76,284 KB
testcase_40 AC 101 ms
76,412 KB
testcase_41 AC 99 ms
76,484 KB
testcase_42 AC 108 ms
76,276 KB
testcase_43 AC 90 ms
76,544 KB
testcase_44 AC 73 ms
71,852 KB
testcase_45 AC 77 ms
75,956 KB
testcase_46 AC 81 ms
76,300 KB
testcase_47 AC 99 ms
76,360 KB
testcase_48 AC 73 ms
71,840 KB
testcase_49 AC 79 ms
76,608 KB
testcase_50 AC 117 ms
76,592 KB
testcase_51 AC 81 ms
76,296 KB
testcase_52 AC 71 ms
71,712 KB
testcase_53 AC 72 ms
71,596 KB
testcase_54 AC 72 ms
71,620 KB
testcase_55 AC 117 ms
76,540 KB
testcase_56 AC 118 ms
76,476 KB
testcase_57 AC 117 ms
76,360 KB
testcase_58 AC 115 ms
76,400 KB
testcase_59 AC 115 ms
76,392 KB
testcase_60 AC 114 ms
76,424 KB
testcase_61 AC 116 ms
76,528 KB
testcase_62 AC 115 ms
76,396 KB
testcase_63 AC 118 ms
76,288 KB
testcase_64 AC 115 ms
76,388 KB
testcase_65 AC 114 ms
76,456 KB
testcase_66 AC 116 ms
76,416 KB
testcase_67 AC 115 ms
76,296 KB
testcase_68 AC 116 ms
76,596 KB
testcase_69 AC 115 ms
76,244 KB
testcase_70 AC 116 ms
76,504 KB
testcase_71 AC 116 ms
76,388 KB
testcase_72 AC 116 ms
76,548 KB
testcase_73 AC 116 ms
76,364 KB
testcase_74 AC 115 ms
76,708 KB
testcase_75 AC 114 ms
76,472 KB
testcase_76 AC 80 ms
76,008 KB
testcase_77 AC 80 ms
76,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10**9)
INF = 10**19
MOD = 10**9 + 7
EPS = 10**-10

N = INT()

A = [0]
for i in range(1, N+1):
    A.append(A[-1]+i)
    if A[-1] > N:
        break

M = len(A)
if N in A:
    print(1)
    exit()
for a in A:
    for b in A:
        if a+b == N:
            print(2)
            exit()
print(3)
0