結果

問題 No.2357 Guess the Function
ユーザー Carpenters-Cat
提出日時 2023-06-23 22:00:38
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 302 bytes
コンパイル時間 1,788 ms
コンパイル使用メモリ 193,296 KB
最終ジャッジ日時 2025-02-15 01:01:09
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main () {
	cout << "? 100" << endl;
	int a;
	cin >> a;
	if (a == 99) {
		cout << "99 100" << endl;
	} else {
		cout << "? " << (100 - a - 1) << endl;
		int B;
		cin >> B;
		B ++;
		int A = (a - 100 + B * 1000) % B;
		cout << A << " " << B << endl;
	}
}
0