結果

問題 No.2088 数当てゲーム
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2022-09-30 21:30:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 147 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 86,380 KB
実行使用メモリ 71,148 KB
最終ジャッジ日時 2023-08-24 14:48:43
合計ジャッジ時間 3,047 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
70,904 KB
testcase_01 AC 69 ms
70,944 KB
testcase_02 AC 70 ms
71,040 KB
testcase_03 AC 71 ms
70,888 KB
testcase_04 AC 71 ms
71,120 KB
testcase_05 AC 71 ms
70,888 KB
testcase_06 AC 72 ms
71,000 KB
testcase_07 AC 73 ms
70,732 KB
testcase_08 AC 70 ms
70,840 KB
testcase_09 AC 72 ms
71,132 KB
testcase_10 AC 72 ms
71,136 KB
testcase_11 AC 71 ms
71,132 KB
testcase_12 AC 73 ms
70,848 KB
testcase_13 AC 72 ms
71,148 KB
testcase_14 AC 71 ms
70,844 KB
testcase_15 AC 72 ms
70,888 KB
testcase_16 AC 70 ms
70,844 KB
testcase_17 AC 71 ms
71,004 KB
testcase_18 AC 70 ms
70,844 KB
testcase_19 AC 70 ms
71,012 KB
testcase_20 AC 70 ms
70,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

x*A+B = x

(A-1)x = -B

"""

import sys

A = int(input())
B = int(input())

if A == 1:
    print (B)
else:
    x = -B // (A-1)
    print (x)
0