結果
問題 | No.1806 Rotating Golem |
ユーザー | ccc |
提出日時 | 2022-07-27 16:32:00 |
言語 | C# (.NET 8.0.203) |
結果 |
AC
|
実行時間 | 54 ms / 2,000 ms |
コード長 | 667 bytes |
コンパイル時間 | 11,682 ms |
コンパイル使用メモリ | 147,336 KB |
実行使用メモリ | 164,324 KB |
最終ジャッジ日時 | 2023-09-24 05:24:25 |
合計ジャッジ時間 | 13,849 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 53 ms
28,380 KB |
testcase_01 | AC | 50 ms
26,788 KB |
testcase_02 | AC | 53 ms
28,640 KB |
testcase_03 | AC | 54 ms
28,548 KB |
testcase_04 | AC | 52 ms
28,476 KB |
testcase_05 | AC | 53 ms
28,420 KB |
testcase_06 | AC | 50 ms
26,956 KB |
testcase_07 | AC | 54 ms
28,576 KB |
testcase_08 | AC | 54 ms
28,536 KB |
testcase_09 | AC | 54 ms
28,636 KB |
testcase_10 | AC | 54 ms
28,304 KB |
testcase_11 | AC | 54 ms
28,392 KB |
testcase_12 | AC | 54 ms
28,544 KB |
testcase_13 | AC | 53 ms
28,496 KB |
testcase_14 | AC | 48 ms
26,844 KB |
testcase_15 | AC | 49 ms
164,324 KB |
コンパイルメッセージ
Determining projects to restore... Restored /home/judge/data/code/main.csproj (in 131 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, double>() { {"N", 0 }, {"E", 1 }, {"S", 2 }, {"W", 3 }, }; // 標準入力取得 var pStart = Console.ReadLine(); var pEnd = Console.ReadLine(); if (pStart == pEnd) { Console.WriteLine("0"); } else { // 工程を算出 var ans = (news[pEnd] - news[pStart] + 4) % 4; Console.WriteLine(ans); } } }