結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
|
提出日時 | 2017-12-17 21:41:41 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 24 ms / 5,000 ms |
コード長 | 813 bytes |
コンパイル時間 | 975 ms |
コンパイル使用メモリ | 111,204 KB |
実行使用メモリ | 25,944 KB |
最終ジャッジ日時 | 2024-12-15 22:57:57 |
合計ジャッジ時間 | 2,114 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.IO; using System.Linq; namespace yukicore { internal class Program { private static void Main(string[] args) { int upper(double n) { if (n % 1 == 0) return (int)n; else return (int)Math.Floor(n) + 1; } int count = 0; int x = int.Parse(Console.ReadLine()); int y = int.Parse(Console.ReadLine()); if (y < 0) count = 2; else if (x != 0) count=1; int dist = int.Parse(Console.ReadLine()); count += upper(1.0 * Math.Abs(x) / dist); count += upper(1.0 * Math.Abs(y) / dist); Console.WriteLine(count); } } }