結果
問題 | No.405 ローマ数字の腕時計 |
ユーザー | kyawashell |
提出日時 | 2017-12-08 17:44:14 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 890 bytes |
コンパイル時間 | 995 ms |
コンパイル使用メモリ | 103,440 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-05-07 05:38:25 |
合計ジャッジ時間 | 2,153 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
コンパイルメッセージ
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[] = {"I","II","III","IIII","V","VI","VII"
ソースコード
#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 + 2000) % 12]); } } return 0; }