結果
| 問題 | No.405 ローマ数字の腕時計 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-07-05 16:56:35 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 300 bytes |
| 記録 | |
| コンパイル時間 | 153 ms |
| コンパイル使用メモリ | 29,056 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-01 02:32:22 |
| 合計ジャッジ時間 | 1,078 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 26 WA * 1 |
ソースコード
#include <stdio.h>
#include <string.h>
int main(void)
{
char s[][5]={"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"},t[5];
int n,i,a;
scanf("%s%d",t,&n);
for(i=0;strcmp(s[i],t);i++);
i++;
if(n==0)a=i;
else if(i+n>0)a=(i+n)%12;
else a=12+(i+n)%12;
puts(s[a-1]);
return 0;
}