結果
| 問題 |
No.1806 Rotating Golem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-27 16:22:28 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 692 bytes |
| コンパイル時間 | 10,375 ms |
| コンパイル使用メモリ | 170,124 KB |
| 実行使用メモリ | 184,332 KB |
| 最終ジャッジ日時 | 2024-07-17 05:18:34 |
| 合計ジャッジ時間 | 9,321 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 5 WA * 8 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (95 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main()
{
// 要素を作成
var news = new Dictionary<string, int>()
{
{"N", 0 },
{"E", 1 },
{"W", 2 },
{"S", 3 },
};
// 標準入力取得
var pStart = Console.ReadLine();
var pEnd = Console.ReadLine();
if (pStart == pEnd)
{
Console.WriteLine("0");
}
else
{
// 絶対値として工程を算出
var ans = Math.Abs((news[pStart] - news[pEnd] + 4) / 4);
Console.WriteLine(ans);
}
}
}