結果
問題 |
No.513 宝探し2
|
ユーザー |
![]() |
提出日時 | 2017-06-02 21:13:08 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 50 ms / 2,000 ms |
コード長 | 646 bytes |
コンパイル時間 | 880 ms |
コンパイル使用メモリ | 108,796 KB |
実行使用メモリ | 43,084 KB |
平均クエリ数 | 2.92 |
最終ジャッジ日時 | 2024-07-17 01:14:22 |
合計ジャッジ時間 | 2,792 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Drawing; public static class Extend { public static string ToAnswer(this Point p) { return $"{p.X} {p.Y}"; } } public class Solution { public static int GetDistance(Point p) { Console.WriteLine(p.ToAnswer()); return int.Parse(Console.ReadLine()); } public static void Main() { Point result = new Point(0, 0); var d0 = GetDistance(new Point(0, 0)); if (d0 != 0) { var d1 = GetDistance(new Point(d0, 0)) / 2; result = new Point(d0 - d1, d1); } Console.WriteLine(result.ToAnswer()); } }