結果

問題 No.141 魔法少女コバ
ユーザー yuki2006yuki2006
提出日時 2015-02-01 23:52:00
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 76 ms / 5,000 ms
コード長 217 bytes
コンパイル時間 2,138 ms
コンパイル使用メモリ 77,408 KB
実行使用メモリ 76,584 KB
最終ジャッジ日時 2023-09-05 09:46:03
合計ジャッジ時間 11,457 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
76,376 KB
testcase_01 AC 69 ms
76,420 KB
testcase_02 AC 69 ms
76,192 KB
testcase_03 AC 70 ms
76,300 KB
testcase_04 AC 71 ms
76,340 KB
testcase_05 AC 69 ms
76,136 KB
testcase_06 AC 70 ms
76,264 KB
testcase_07 AC 69 ms
76,536 KB
testcase_08 AC 70 ms
76,416 KB
testcase_09 AC 69 ms
76,384 KB
testcase_10 AC 70 ms
76,276 KB
testcase_11 AC 70 ms
76,108 KB
testcase_12 AC 71 ms
76,584 KB
testcase_13 AC 69 ms
76,196 KB
testcase_14 AC 71 ms
76,108 KB
testcase_15 AC 69 ms
76,124 KB
testcase_16 AC 69 ms
76,076 KB
testcase_17 AC 70 ms
76,044 KB
testcase_18 AC 69 ms
76,552 KB
testcase_19 AC 70 ms
76,344 KB
testcase_20 AC 70 ms
76,192 KB
testcase_21 AC 69 ms
76,296 KB
testcase_22 AC 69 ms
76,380 KB
testcase_23 AC 69 ms
76,296 KB
testcase_24 AC 70 ms
76,300 KB
testcase_25 AC 68 ms
76,132 KB
testcase_26 AC 70 ms
76,356 KB
testcase_27 AC 69 ms
76,296 KB
testcase_28 AC 70 ms
76,300 KB
testcase_29 AC 71 ms
76,328 KB
testcase_30 AC 69 ms
76,136 KB
testcase_31 AC 69 ms
76,248 KB
testcase_32 AC 69 ms
76,348 KB
testcase_33 AC 70 ms
76,440 KB
testcase_34 AC 69 ms
76,304 KB
testcase_35 AC 70 ms
76,376 KB
testcase_36 AC 70 ms
76,224 KB
testcase_37 AC 68 ms
76,568 KB
testcase_38 AC 69 ms
76,172 KB
testcase_39 AC 70 ms
76,184 KB
testcase_40 AC 69 ms
76,304 KB
testcase_41 AC 70 ms
76,292 KB
testcase_42 AC 71 ms
76,180 KB
testcase_43 AC 70 ms
76,500 KB
testcase_44 AC 71 ms
76,344 KB
testcase_45 AC 70 ms
76,252 KB
testcase_46 AC 69 ms
76,316 KB
testcase_47 AC 70 ms
76,108 KB
testcase_48 AC 71 ms
76,344 KB
testcase_49 AC 70 ms
76,108 KB
testcase_50 AC 69 ms
76,320 KB
testcase_51 AC 70 ms
76,316 KB
testcase_52 AC 69 ms
76,044 KB
testcase_53 AC 69 ms
76,320 KB
testcase_54 AC 72 ms
76,448 KB
testcase_55 AC 70 ms
76,012 KB
testcase_56 AC 70 ms
76,500 KB
testcase_57 AC 76 ms
76,324 KB
testcase_58 AC 70 ms
76,388 KB
testcase_59 AC 71 ms
76,440 KB
testcase_60 AC 71 ms
76,180 KB
testcase_61 AC 71 ms
76,536 KB
testcase_62 AC 71 ms
76,188 KB
testcase_63 AC 70 ms
76,324 KB
testcase_64 AC 72 ms
76,176 KB
testcase_65 AC 72 ms
76,104 KB
testcase_66 AC 71 ms
76,004 KB
testcase_67 AC 73 ms
76,292 KB
testcase_68 AC 71 ms
76,364 KB
testcase_69 AC 71 ms
76,328 KB
testcase_70 AC 71 ms
76,372 KB
testcase_71 AC 71 ms
76,256 KB
testcase_72 AC 70 ms
76,340 KB
testcase_73 AC 72 ms
76,368 KB
testcase_74 AC 70 ms
76,332 KB
testcase_75 AC 70 ms
76,108 KB
testcase_76 AC 72 ms
76,292 KB
testcase_77 AC 70 ms
76,136 KB
testcase_78 AC 71 ms
76,352 KB
testcase_79 AC 73 ms
76,264 KB
testcase_80 AC 73 ms
76,044 KB
testcase_81 AC 71 ms
76,080 KB
testcase_82 AC 70 ms
76,284 KB
testcase-evil-0.txt AC 70 ms
76,620 KB
testcase-evil-1.txt AC 71 ms
76,352 KB
testcase-evil-2.txt AC 70 ms
76,256 KB
testcase-evil-3.txt AC 71 ms
76,312 KB
testcase-evil-4.txt AC 70 ms
76,288 KB
testcase-evil-5.txt AC 71 ms
76,336 KB
testcase-evil-6.txt AC 71 ms
76,444 KB
testcase-evil-7.txt AC 70 ms
76,104 KB
testcase-evil-8.txt AC 70 ms
76,176 KB
testcase-evil-9.txt AC 71 ms
76,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

M, N = map(int, raw_input().split())

cnt = 0
while N > 0:
    cnt += M / N + 1
    r = M % N
    M = N
    N = r
    
# Nが1になった時に逆数にしなくてもいい分と
# 1から始める分

print cnt - 2
0