結果
問題 |
No.405 ローマ数字の腕時計
|
ユーザー |
![]() |
提出日時 | 2018-09-17 19:45:57 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 569 bytes |
コンパイル時間 | 775 ms |
コンパイル使用メモリ | 103,680 KB |
実行使用メモリ | 17,792 KB |
最終ジャッジ日時 | 2024-07-18 07:47:34 |
合計ジャッジ時間 | 2,258 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 RE * 8 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; public class Hello { public static void Main() { var a = new string[13] {"", "I", "II", "III", "IIII", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII" }; string[] line = Console.ReadLine().Trim().Split(' '); var s1 = line[0]; var t = int.Parse(line[1]); for (int i = 0; i < 13; i++) { if (s1 == a[i]) { var w = (i + t) % 12; if (w == 0) w = 12; Console.WriteLine(a[w]); break; } } } }