結果

問題 No.2088 数当てゲーム
ユーザー madokamadoka
提出日時 2022-09-30 23:03:23
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 2,540 bytes
コンパイル時間 3,563 ms
コンパイル使用メモリ 142,268 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-24 16:36:58
合計ジャッジ時間 2,738 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 AC 1 ms
4,376 KB
testcase_20 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <bits/stdc++.h>
#include <time.h>
#include <stack>
#include <array>



#define popcount __builtin_popcount
using namespace std;

#define rep(i,x) for(long long i=0;i<x;i++)
#define repn(i,x) for(long long i=1;i<=x;i++)
#define rrep(i,x) for(long long i=x-1;i>=0;i--)
#define rrepn(i,x) for(long long i=x;i>1;i--)
#define REP(i,n,x) for(long long i=n;i<x;i++)
#define REPN(i,n,x) for(long long i=n+1;i<x;i++)

#define re return
#define fi first
#define se second
#define pr printf
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }

#define all(x) (x).begin(),(x).end()

typedef long long int ll;

const double PI=3.14159265358979323846;
//#define INF 1e18+5//19桁
#define INF 9223372036854775807
//-9,223,372,036,854,775,808~9,223,372,036,854,775,807
//-9223372036854775808~9223372036854775807

#define inf  INT_MAX//19桁
//#define mp make_pair
//using lll=__int128_t;

const ll mask=(1<<20)-1;
typedef pair<long long, long long> P;


//int dp[MAX][MAX];
const int MAX = 500;
const int MOD = 1000000007;
//#define MAX 105
ll wk,wk1,wk2,wk3,wk4;
double dA,dB,dC,dD,dE,dF,dG,dH,dI,dJ,dK,dL,dM,dN,dO,dP,dQ,dR,dS,dT,dU,dV,dW,dX,dY,dZ;
double dwk,dwk1,dwk2,dwk3,dwk4,dsum;
ll A,B,C,D,E,F,G,I,J,K,L,M,N,O,R,S,T,U,V,X,Y,Z;//P,Q,H,Wは無し
//ll a,b,c,d,e,f,g,i,j,k,l,m,n,o,r,s,t,u,v,x,y,z;//p,q,h,wは無し
ll cnt,flg;
ll ans,sum=0;
//int n;
//int t[200020];
//int a[200020], b[200020];

//vector<ll> A[MAX];
//int ans[200020];

//#define mod 1000000007//atcoder/allを使う時にはコメントアウト
//#define mod 998244353//atcoder/allを使う時にはコメントアウト

//g++ new_formatcopy.cpp -std=c++14 -I /mnt/c/code/
//もしくはexport CPATH=$CPATH:/mnt/c/code/

//**************ここまでフォーマット***************



int main(){	
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll max=0;
    ll min=INF;


    cin>>A>>B;
    if(A==1){
        cout<<2*B;
    }
    else{
        cout<<-B/(A-1);
    }
}
0