結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
merumeru_333333
|
| 提出日時 | 2020-01-04 15:40:20 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 5,000 ms |
| コード長 | 677 bytes |
| コンパイル時間 | 4,258 ms |
| コンパイル使用メモリ | 102,400 KB |
| 実行使用メモリ | 17,920 KB |
| 最終ジャッジ日時 | 2024-11-22 20:43:24 |
| 合計ジャッジ時間 | 4,536 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
class test2
{
static void Main()
{
double x = double.Parse(Console.ReadLine());
double y = double.Parse(Console.ReadLine());
double l = double.Parse(Console.ReadLine());
int movecnt = 0;
double a, b, c;
a = Math.Abs(x) / l;
b = Math.Abs(y) / l;
c= Math.Ceiling(a)+Math.Ceiling(b);
movecnt = (int)c;
if (x != 0)
{
movecnt = movecnt + 1;
}
else if (x == 0 && y < 0)
{
movecnt = movecnt + 1;
}
if (y < 0)
{
movecnt = movecnt + 1;
}
Console.WriteLine(movecnt);
}
}
merumeru_333333