結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
oemon
|
| 提出日時 | 2016-11-23 23:32:36 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 22 ms / 5,000 ms |
| コード長 | 634 bytes |
| コンパイル時間 | 1,311 ms |
| コンパイル使用メモリ | 103,680 KB |
| 実行使用メモリ | 17,792 KB |
| 最終ジャッジ日時 | 2024-11-27 10:25:24 |
| 合計ジャッジ時間 | 2,035 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
namespace No48
{
class Program
{
static void Main(string[] args)
{
var X = double.Parse(Console.ReadLine());
var Y = double.Parse(Console.ReadLine());
var L = double.Parse(Console.ReadLine());
var result = 0;
result += (int)Math.Ceiling(Math.Abs(X) / L);
result += (int)Math.Ceiling(Math.Abs(Y) / L);
if (Y < 0)
{
result += 2;
}
else
{
if (X != 0) result += 1;
}
Console.Write(result);
}
}
}
oemon