結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
![]() |
提出日時 | 2017-03-21 02:49:13 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 23 ms / 5,000 ms |
コード長 | 428 bytes |
コンパイル時間 | 855 ms |
コンパイル使用メモリ | 102,656 KB |
実行使用メモリ | 17,920 KB |
最終ジャッジ日時 | 2024-07-05 04:50:23 |
合計ジャッジ時間 | 2,205 ms |
ジャッジサーバーID (参考情報) |
judge5 / 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.Linq; class P { static void Main(string[] _) { int x = int.Parse(Console.ReadLine()); int y = int.Parse(Console.ReadLine()); int l = int.Parse(Console.ReadLine()); int n = x == 0 && y >= 0 ? 0 : x != 0 && y >= 0 ? 1 : 2; n += (int)Math.Ceiling(Math.Abs(x) / (double)l) + (int)Math.Ceiling(Math.Abs(y) / (double)l); Console.WriteLine(n); } }