結果
問題 | No.1806 Rotating Golem |
ユーザー | ccc |
提出日時 | 2022-07-27 16:22:28 |
言語 | C# (.NET 8.0.203) |
結果 |
WA
|
実行時間 | - |
コード長 | 692 bytes |
コンパイル時間 | 7,731 ms |
コンパイル使用メモリ | 144,972 KB |
実行使用メモリ | 160,876 KB |
最終ジャッジ日時 | 2023-09-24 05:04:14 |
合計ジャッジ時間 | 8,966 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 43 ms
26,472 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 44 ms
26,176 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 46 ms
26,492 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | AC | 46 ms
26,420 KB |
testcase_13 | WA | - |
testcase_14 | AC | 44 ms
26,276 KB |
testcase_15 | AC | 43 ms
160,876 KB |
コンパイルメッセージ
Determining projects to restore... Restored /home/judge/data/code/main.csproj (in 120 ms). .NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f Copyright (C) Microsoft Corporation.All rights reserved. プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください main -> /home/judge/data/code/bin/Release/net6.0/main.dll main -> /home/judge/data/code/bin/Release/net6.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); } } }