結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-08-26 14:39:17 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 15 ms / 5,000 ms |
| コード長 | 587 bytes |
| 記録 | |
| コンパイル時間 | 2,166 ms |
| コンパイル使用メモリ | 103,296 KB |
| 実行使用メモリ | 18,560 KB |
| 最終ジャッジ日時 | 2026-05-15 22:34:28 |
| 合計ジャッジ時間 | 3,487 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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 S18_robot{
public static int Main(string[] args){
int x, y, l;
int count = 0;
x = int.Parse(Console.ReadLine());
y = int.Parse(Console.ReadLine());
l = int.Parse(Console.ReadLine());
if(y < 0){
count += 2;
}else if(Math.Abs(x) > 0){
count += 1;
}
if(Math.Abs(x) % l == 0)
count += Math.Abs(x) / l;
else
count += Math.Abs(x) / l + 1;
if(Math.Abs(y) % l == 0)
count += Math.Abs(y) / l;
else
count += Math.Abs(y) / l + 1;
Console.WriteLine("{0}",count);
return 0;
}
}