結果

問題 No.405 ローマ数字の腕時計
ユーザー makonagixmakonagix
提出日時 2017-01-06 22:11:25
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 945 bytes
コンパイル時間 1,279 ms
コンパイル使用メモリ 52,428 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-08-25 18:24:30
合計ジャッジ時間 1,396 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 WA -
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 WA -
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 WA -
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 1 ms
4,380 KB
testcase_20 WA -
testcase_21 AC 2 ms
4,380 KB
testcase_22 WA -
testcase_23 AC 1 ms
4,380 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

int main() {
	string s1;
	int s = 0;
	int D = 0;
	int t;
	cin >> s1 >> t;
	if (s1 == "I") s = 1;
	else if (s1 == "II") s = 2;
	else if (s1 == "III") s = 3;
	else if (s1 == "IIII") s = 4;
	else if (s1 == "V") s = 5;
	else if (s1 == "VI") s = 6;
	else if (s1 == "VII") s = 7;
	else if (s1 == "VIII") s = 8;
	else if (s1 == "IX") s = 9;
	else if (s1 == "X") s = 10;
	else if (s1 == "XI") s = 11;
	else if (s1 == "XII") s = 0;

	D = (s + t) % 12;

	if (D == 1) cout << "I" << endl;
	if (D == 2) cout << "II" << endl;
	if (D == 3) cout << "III" << endl;
	if (D == 4) cout << "IIII" << endl;
	if (D == 5) cout << "V" << endl;
	if (D == 6) cout << "VI" << endl;
	if (D == 7) cout << "VII" << endl;
	if (D == 8) cout << "VIII" << endl;
	if (D == 9) cout << "IX" << endl;
	if (D == 10) cout << "X" << endl;
	if (D == 11) cout << "XI" << endl;
	if (D == 12) cout << "XII" << endl;

	return 0;
}
0