結果

問題 No.514 宝探し3
ユーザー mbanmban
提出日時 2017-05-06 15:32:22
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 766 bytes
コンパイル時間 1,972 ms
コンパイル使用メモリ 108,212 KB
実行使用メモリ 38,656 KB
平均クエリ数 2.75
最終ジャッジ日時 2023-09-23 13:57:48
合計ジャッジ時間 3,926 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
38,656 KB
testcase_01 AC 77 ms
36,372 KB
testcase_02 AC 78 ms
38,512 KB
testcase_03 AC 80 ms
38,348 KB
testcase_04 AC 78 ms
38,352 KB
testcase_05 AC 79 ms
36,416 KB
testcase_06 AC 79 ms
38,620 KB
testcase_07 AC 77 ms
36,204 KB
testcase_08 AC 72 ms
36,864 KB
testcase_09 AC 77 ms
37,040 KB
testcase_10 AC 78 ms
38,336 KB
testcase_11 AC 78 ms
38,480 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
using System.Linq;

class Program
{
    static void Main()
    {
        new Magatro().Solve();
    }
}

class Magatro
{
    int one, two;
    public void Solve()
    {
        Console.WriteLine("0 0");
        one = int.Parse(Console.ReadLine());
        if (one == 0)
        {
            return;
        }
        Console.WriteLine("0 1000000000");
        two = int.Parse(Console.ReadLine());
        if (two == 0)
        {
            return;
        }
        int x = (one + two - 1000000000) / 2;
        int y = one - x;

        Console.WriteLine($"{x} {y}");
    }
}

0