結果
| 問題 |
No.2357 Guess the Function
|
| コンテスト | |
| ユーザー |
Adamantite
|
| 提出日時 | 2023-06-25 00:30:26 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 618 bytes |
| コンパイル時間 | 7,911 ms |
| コンパイル使用メモリ | 167,584 KB |
| 実行使用メモリ | 46,040 KB |
| 平均クエリ数 | 3.00 |
| 最終ジャッジ日時 | 2024-07-02 02:57:28 |
| 合計ジャッジ時間 | 9,807 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 10 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (96 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("? 1");
int x = int.Parse(Console.ReadLine());
Console.WriteLine("? 100");
int y = int.Parse(Console.ReadLine());
int a = (101 - x - y) / 2;
int b = 0;
for(int i = 1; i <= 100; i++) {
if((100 + a) % i == y) {
b = i;
break;
}
}
Console.WriteLine(string.Format("! {0} {1}", a, b));
}
}
}
Adamantite