結果
| 問題 |
No.405 ローマ数字の腕時計
|
| コンテスト | |
| ユーザー |
kyawashell
|
| 提出日時 | 2017-12-08 17:45:06 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 20 ms / 2,000 ms |
| コード長 | 890 bytes |
| コンパイル時間 | 974 ms |
| コンパイル使用メモリ | 102,248 KB |
| 最終ジャッジ日時 | 2025-01-05 04:59:59 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
コンパイルメッセージ
main.cpp:31:14: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
31 | char *s[] = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
| ^~~
main.cpp:31:18: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
31 | char *s[] = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
| ^~~~
main.cpp:31:23: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
31 | char *s[] = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
| ^~~~~
main.cpp:31:29: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
31 | char *s[] = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
| ^~~~~~
main.cpp:31:36: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
31 | char *s[] = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
| ^~~
main.cpp:31:40: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
31 | char *s[] = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
| ^~~~
main.cpp:31:45: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
31 | char *s[] = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
| ^~~~~
main.cpp:31:51: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
31 | char *s[] = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
| ^~~~~~
main.cpp:31:58: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
31 | char *s[] = {
ソースコード
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<climits>
#include<iostream>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<complex>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define pb push_back
int dy[]={0, 0, 1, -1, 1, 1, -1, -1};
int dx[]={1, -1, 0, 0, 1, -1, -1, 1};
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define mp make_pair
#define fi first
#define sc second
char *s[] = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
int main(){
char s1[1000];
int t;
scanf("%s%d",s1,&t);
REP(i,12){
if(strcmp(s[i],s1) == 0){
printf("%s\n",s[(i + t + 1200) % 12]);
}
}
return 0;
}
kyawashell