結果
| 問題 | 
                            No.98 円を描こう
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-01-22 14:52:43 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 629 bytes | 
| コンパイル時間 | 2,330 ms | 
| コンパイル使用メモリ | 109,308 KB | 
| 実行使用メモリ | 27,104 KB | 
| 最終ジャッジ日時 | 2024-12-25 23:50:15 | 
| 合計ジャッジ時間 | 3,388 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 WA * 1 | 
| other | AC * 1 WA * 5 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
namespace lecture
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            string[] A = Console.ReadLine().Split();
            int x = int.Parse(A[0]);
            int y = int.Parse(A[1]);
            // 点pまでの距離 
            double r = Math.Sqrt(x * x + y * y);
            // 直径
            double d = 2 * r;
            // 切り上げしても同じ数だった場合は整数のはず
            if (Math.Ceiling(d) == d ){
                d += 1;
            }
            Console.WriteLine(d);
        }
    }
}