結果
| 問題 | 
                            No.405 ローマ数字の腕時計
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2025-01-27 15:19:18 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,529 bytes | 
| コンパイル時間 | 1,000 ms | 
| コンパイル使用メモリ | 107,568 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2025-01-27 15:19:20 | 
| 合計ジャッジ時間 | 2,257 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 25 WA * 2 | 
ソースコード
#define _USE_MATH_DEFINES
#include  <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include<math.h>
#include<iomanip>
#include<stdio.h>
#include <stdlib.h>
#include<stdio.h>
#include <queue>
#include<map>
#include <fstream>
#include <sstream>
#include<set>
#include<stack>
#include<time.h>
#include <sys/types.h>
#include <tuple>
#include <numeric>
#include <iterator>
typedef long long int ll;
//#include<bits/stdc++.h>
using namespace std;
int main()
{
    int Q;
    Q = 1;
    //cin >> Q;
    while (Q--) {
        string p;
        int a;
        int t = 0;
        cin >> p >> a;
        if (p == "I")t = 1;
        if (p == "II")t = 2;
        if (p == "III")t = 3;
        if (p == "IIII")t = 4;
        if (p == "V")t = 5;
        if (p == "VI")t = 6;
        if (p == "VII")t = 7;
        if (p == "VIII")t = 8;
        if (p == "IX")t = 9;
        if (p == "X")t = 10;
        if (p == "XI")t = 11;
        if (p == "XII")t = 0;
        t += a;
        if (t >= 12)t %= 12;
        if (t < 0) {
            t %= 12;
            t += 12;
        }
        
        if (t == 1)p = "I";
        if (t == 2)p = "II";
        if (t == 3)p = "III";
        if (t == 4)p = "IIII";
        if (t == 5)p = "V";
        if (t == 6)p = "VI";
        if (t == 7)p = "VII";
        if (t == 8)p = "VIII";
        if (t == 9)p = "IX";
        if (t == 10)p = "X";
        if (t == 11)p = "XI";
        if (t == 0)p = "XII";
        cout << p;
    }
    return 0;
}