結果
問題 | No.2088 数当てゲーム |
ユーザー |
|
提出日時 | 2022-09-30 22:47:22 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 403 bytes |
コンパイル時間 | 2,092 ms |
コンパイル使用メモリ | 192,552 KB |
最終ジャッジ日時 | 2025-02-07 19:42:35 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <bits/stdc++.h>#define rep(i,n) for(int i = 0; i < (n); i++)using namespace std;typedef long long ll;int main(){cin.tie(0);ios::sync_with_stdio(0);// x// Ax + B = x// (A - 1) x = -B// x = -B / (A-1)ll A,B; cin >> A >> B;if(A == 1LL) {assert(B == 0);cout << 1 << endl;} else {cout << -B / (A - 1) << endl;}}