結果
問題 |
No.98 円を描こう
|
ユーザー |
|
提出日時 | 2016-08-27 17:35:01 |
言語 | D (dmd 2.109.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 364 bytes |
コンパイル時間 | 3,121 ms |
コンパイル使用メモリ | 102,032 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-12 03:44:58 |
合計ジャッジ時間 | 1,426 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 4 WA * 2 |
ソースコード
import std.algorithm, std.array, std.range; import std.string, std.conv; import std.math; import std.stdio, std.typecons; void main() { auto rd = readln.split.map!(to!int); auto xp = rd[0]; auto yp = rd[1]; auto r = sqrt((xp ^^ 2 + yp ^^ 2).to!real).to!int; if (r ^^2 == xp ^^2 + yp ^^2) r = r * 2 + 1; else r = (r + 1) * 2; writeln(r); }