結果
| 問題 |
No.405 ローマ数字の腕時計
|
| コンテスト | |
| ユーザー |
tossy
|
| 提出日時 | 2016-08-05 22:30:31 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 865 bytes |
| コンパイル時間 | 841 ms |
| コンパイル使用メモリ | 95,892 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-06 18:58:24 |
| 合計ジャッジ時間 | 1,555 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
ソースコード
#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <bitset>
using namespace std;
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define fi first
#define se second
#define INF 2147483600
int main(){
map<string, int> m;
m["I"]=1;
m["II"]=2;
m["III"]=3;
m["IIII"]=4;
m["V"]=5;
m["VI"]=6;
m["VII"]=7;
m["VIII"]=8;
m["IX"]=9;
m["X"]=10;
m["XI"]=11;
m["XII"]=12;
string s;
cin>>s;
int t;
cin>>t;
t = (m[s]+t+1200-1)%12+1;
for(auto it : m) if(it.se == t) cout<<it.fi<<endl;
return 0;
}
tossy