結果

問題 No.634 硬貨の枚数1
ユーザー piconic_Xpiconic_X
提出日時 2018-01-19 22:23:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 436 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 10,840 KB
実行使用メモリ 12,536 KB
最終ジャッジ日時 2023-08-26 18:40:44
合計ジャッジ時間 5,497 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 14 ms
7,760 KB
testcase_02 AC 15 ms
7,808 KB
testcase_03 WA -
testcase_04 AC 14 ms
7,712 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 14 ms
7,672 KB
testcase_09 AC 14 ms
7,744 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 14 ms
7,824 KB
testcase_13 WA -
testcase_14 AC 15 ms
7,744 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 15 ms
7,720 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 15 ms
7,828 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 14 ms
7,836 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 TLE -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
testcase_65 -- -
testcase_66 -- -
testcase_67 -- -
testcase_68 -- -
testcase_69 -- -
testcase_70 -- -
testcase_71 -- -
testcase_72 -- -
testcase_73 -- -
testcase_74 -- -
testcase_75 -- -
testcase_76 -- -
testcase_77 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

K = []
cnt = 0
for i in range(1,N):
    k = i*(i+1)/2
    if k>N:
        N %= K[-1]
        cnt += 1
        break
    elif k==N:
        N = 0
        cnt += 1
        break
    else:
        K.append(k)

while N>0:
    for i in range(len(K)):
        if K[i]>N:
            N %= K[i-1]
            cnt += 1
            break
        elif K[i]==N:
            N = 0
            cnt += 1
            break

print(cnt)
0