結果
問題 | No.98 円を描こう |
ユーザー |
![]() |
提出日時 | 2017-08-21 11:32:05 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 28 ms / 5,000 ms |
コード長 | 506 bytes |
コンパイル時間 | 828 ms |
コンパイル使用メモリ | 103,808 KB |
実行使用メモリ | 19,328 KB |
最終ジャッジ日時 | 2024-10-15 00:48:08 |
合計ジャッジ時間 | 1,695 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;namespace DrawCircle{class Program{static void Main(string[] args){string[] param = Console.ReadLine().Split(' ');int Px = int.Parse(param[0]);int Py = int.Parse(param[1]);double r = Math.Sqrt( Math.Pow(Px, 2) + Math.Pow( Py , 2) );double d = r % 1;r = Math.Truncate(r);r = ( d < 0.5 ) ? ( r + 0.5 ) : ( r + 1 );Console.WriteLine( r * 2 );}}}