結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-02 04:08:28 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 461 bytes |
| 記録 | |
| コンパイル時間 | 678 ms |
| コンパイル使用メモリ | 107,940 KB |
| 実行使用メモリ | 26,564 KB |
| 最終ジャッジ日時 | 2026-03-15 16:51:17 |
| 合計ジャッジ時間 | 2,013 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 WA * 1 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
public class Program
{
static void Main()
{
int x = int.Parse(Console.ReadLine());
int y = int.Parse(Console.ReadLine());
int l = int.Parse(Console.ReadLine());
int c = 0;
if (y < 0)
{
c += 1;
y = -y;
}
c += (y + l - 1) / l;
if (x != 0)
{
c += 1 + (Math.Abs(x) + l - 1) / l;
}
Console.WriteLine(c);
}
}