結果
問題 |
No.2357 Guess the Function
|
ユーザー |
|
提出日時 | 2023-06-23 22:21:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 456 bytes |
コンパイル時間 | 1,922 ms |
コンパイル使用メモリ | 192,824 KB |
最終ジャッジ日時 | 2025-02-15 01:13:01 |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 6 WA * 1 RE * 3 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main() { cout << "? 100" << endl; int a; cin >> a; if (a == 99) { cout << 100 << " " << 99 << endl; exit(0); } cout << "? " << 100 - a - 1 << endl; int b; cin >> b; int B = b + 1; for (int A = 1; A < B; A++) { if (!((A + 100) % B == a)) continue; if (!((A + 100 - a - 1) % B == b)) continue; cout << "! " << A << " " << B << endl; exit(0); } exit(1); }