結果
問題 | No.405 ローマ数字の腕時計 |
ユーザー | AREIDO2 |
提出日時 | 2016-08-23 15:17:42 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 1,088 bytes |
コンパイル時間 | 603 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-06 12:29:11 |
合計ジャッジ時間 | 1,235 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | RE | - |
testcase_02 | RE | - |
testcase_03 | AC | 9 ms
6,144 KB |
testcase_04 | RE | - |
testcase_05 | AC | 10 ms
6,144 KB |
testcase_06 | AC | 10 ms
6,144 KB |
testcase_07 | AC | 12 ms
6,144 KB |
testcase_08 | RE | - |
testcase_09 | AC | 9 ms
6,144 KB |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | AC | 9 ms
6,144 KB |
testcase_13 | AC | 9 ms
6,144 KB |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | AC | 10 ms
6,144 KB |
testcase_17 | AC | 10 ms
6,144 KB |
testcase_18 | RE | - |
testcase_19 | AC | 10 ms
6,144 KB |
testcase_20 | RE | - |
testcase_21 | AC | 10 ms
6,016 KB |
testcase_22 | RE | - |
testcase_23 | RE | - |
testcase_24 | RE | - |
testcase_25 | AC | 10 ms
6,144 KB |
testcase_26 | AC | 9 ms
6,144 KB |
ソースコード
#!/usr/bin/env python #coding:UTF-8 #入力値の取得 S1,T = raw_input().split() #S1の値の変換 if S1 == "I": S1 = "1" elif S1 == "II": S1 = "2" elif S1 == "III": S1 = "3" elif S1 == "IIII": S1 = "4" elif S1 == "V": S1 = "5" elif S1 == "VI": S1 = "6" elif S1 == "VII": S1 = "7" elif S1 == "VIII": S1 = "8" elif S1 == "VIIII": S1 = "9" elif S1 == "X": S1 = "10" elif S1 == "XI": S1 = "11" elif S1 == "XII": S1 = "12" #ずらす時間の演算 T2 = int(T) % 12 #時間の演算 S2 = int(S1) + T2 #S2の値の変換 if S2 == 12 or S2 == 0: S3= "XII" elif S2 == 1 or S2 == -11: S3= "I" elif S2 == 2 or S2 == -10: S3= "II" elif S2 == 3 or S2 == -9: S3= "III" elif S2 == 4 or S2 == -8: S3= "IIII" elif S2 == 5 or S2 == -7: S3= "V" elif S2 == 6 or S2 == -6: S3= "VI" elif S2 == 7 or S2 == -5: S3 = "VII" elif S2 == 8 or S2 == -4: S3 = "VIII" elif S2 == 9 or S2 == -3: S3 = "VIIII" elif S2 == 10 or S2 == -2: S3 = "X" elif S2 == 11 or S2 == -1: S3 = "XI" print S3