結果
問題 | No.405 ローマ数字の腕時計 |
ユーザー |
![]() |
提出日時 | 2021-11-28 21:36:59 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 354 bytes |
コンパイル時間 | 2,111 ms |
コンパイル使用メモリ | 194,964 KB |
最終ジャッジ日時 | 2025-01-26 02:28:20 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) int main(){ string s[12]={"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"}; int x=0; string s1;cin>>s1; int t;cin>>t; t+=1200; rep(i,12){ if(s1==s[i]){ x=i; break; } } int y=(x+t)%12; cout<<s[y]<<endl; return 0; }