結果
| 問題 |
No.1806 Rotating Golem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-27 16:13:45 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 683 bytes |
| コンパイル時間 | 9,165 ms |
| コンパイル使用メモリ | 167,528 KB |
| 実行使用メモリ | 182,632 KB |
| 最終ジャッジ日時 | 2024-07-17 05:06:59 |
| 合計ジャッジ時間 | 10,688 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 10 WA * 3 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (97 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", 1 },
{"E", 2 },
{"S", 3 },
{"W", 4 },
};
// 標準入力取得
var pStart = Console.ReadLine();
var pEnd = Console.ReadLine();
if ( pStart == pEnd)
{
Console.WriteLine("0");
}
else
{
// 絶対値として工程を算出
var ans = Math.Abs(news[pStart] - news[pEnd]);
Console.WriteLine(ans);
}
}
}