結果
問題 | No.2357 Guess the Function |
ユーザー | CleyL |
提出日時 | 2023-12-05 23:35:57 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 28 ms / 1,000 ms |
コード長 | 321 bytes |
コンパイル時間 | 691 ms |
コンパイル使用メモリ | 67,772 KB |
実行使用メモリ | 24,012 KB |
平均クエリ数 | 2.91 |
最終ジャッジ日時 | 2023-12-05 23:36:00 |
合計ジャッジ時間 | 2,199 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 27 ms
24,000 KB |
testcase_01 | AC | 24 ms
24,012 KB |
testcase_02 | AC | 23 ms
24,012 KB |
testcase_03 | AC | 24 ms
24,012 KB |
testcase_04 | AC | 23 ms
24,012 KB |
testcase_05 | AC | 28 ms
24,012 KB |
testcase_06 | AC | 23 ms
24,012 KB |
testcase_07 | AC | 23 ms
24,012 KB |
testcase_08 | AC | 28 ms
24,012 KB |
testcase_09 | AC | 23 ms
24,012 KB |
testcase_10 | AC | 24 ms
24,012 KB |
ソースコード
#include <iostream> using namespace std; int main(){ cout << "? 100" << endl; int x;cin>>x; if(x == 99){ cout << "! " << 99 << " " << 100 << endl; }else{ cout << "? " << 100-(x+1) << endl; int y;cin>>y; int B = y+1; int A = (x+y+-99+B*100)%B; cout << "! " << A << " " << B << endl; } }