結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
pirorirori_n712
|
| 提出日時 | 2018-07-28 02:18:44 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 504 bytes |
| 記録 | |
| コンパイル時間 | 761 ms |
| コンパイル使用メモリ | 102,400 KB |
| 実行使用メモリ | 17,792 KB |
| 最終ジャッジ日時 | 2024-07-05 18:10:08 |
| 合計ジャッジ時間 | 2,092 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 23 |
コンパイルメッセージ
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 No48{
static void Main(){
var a=Int32.Parse(Console.ReadLine());
var b=Int32.Parse(Console.ReadLine());
var c=Int32.Parse(Console.ReadLine());
var d=0;
if(b>0){
d+=(b%c==0)?b/c:b/c+1;
}else if(b<0){
b=Math.Abs(b);
d+=(b%c==0)?b/c+1:b/c+2;
}
if(b!=0){
a=Math.Abs(a);
d+=(a%c==0)?a/c:a/c+1;
}
Console.WriteLine(d);
}
}
pirorirori_n712