結果
問題 |
No.2357 Guess the Function
|
ユーザー |
![]() |
提出日時 | 2023-06-25 01:48:21 |
言語 | C# (.NET 8.0.404) |
結果 |
RE
|
実行時間 | - |
コード長 | 639 bytes |
コンパイル時間 | 14,937 ms |
コンパイル使用メモリ | 168,776 KB |
実行使用メモリ | 51,672 KB |
平均クエリ数 | 2.91 |
最終ジャッジ日時 | 2024-07-02 04:09:41 |
合計ジャッジ時間 | 17,778 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 RE * 1 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (97 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System; namespace A_GuesstheFunction { internal class Program { static void Main(string[] args) { Console.WriteLine("? 100"); int y1 = int.Parse(Console.ReadLine()); Console.WriteLine("? " + (100 - y1 - 1)); int y2 = int.Parse(Console.ReadLine()); int b = y2 + 1; int a = 0; for (int i = 1; i < 100; i++) { if (100 <= i * b + y1) { a = i * b + y1 - 100; break; } } Console.WriteLine(string.Format("! {0} {1}", a, b)); } } }