#include <stdio.h>
int main(void) {
char strc[12][3] ={"黒","茶","赤","橙","黄","緑","青","紫","灰","白","金","銀"};
char instr[10][3];
int bai[12]={0, 1, 2, 3, 4, 5, 6, 7, 0, -3, -1, -2};
double pre[12]={0, 1, 2, 0.05, 0, 0.5, 0.25, 0.1, 0, 0, 5, 10};
int i,j,k,b,p;
int C[4];
scanf("%s",instr
);//inputから読み込み
// 1~2のカラーコード(抵抗値)
for (i=0; i<=2; i++){
for (j=0; j<=9; j++){
for (k=0;k<=2; k++){
if( !(instr[i][k]==strc[j][k])){
goto A1;
}
}
C[i]=j;
A1:;
}
}
// 3のカラーコード(倍率)
i=2;
for (j=0; j<=11; j++){
for (k=0;k<=2; k++){
if( !(instr[i][k]==strc[j][k])){
goto A2;
}
}
b=j;
A2:;
}
// 4のカラーコード(精度)
i=3;
for (j=0; j<=11; j++){
for (k=0;k<=2; k++){
if( !(instr[i][k]==strc[j][k])){
goto A3;
}
}
p=j;
A3:;
}
printf("%d %d %d %d\n",C
[0],C
[1],b
,p
); printf("抵抗値=%d×10^(%d)[Ω] 精度=%.2f[%%]\n",10*C
[0]+C
[1],bai
[b
],pre
[p
]);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CiAgICBjaGFyIHN0cmNbMTJdWzNdID17Ium7kiIsIuiMtiIsIui1pCIsIuapmSIsIum7hCIsIue3kSIsIumdkiIsIue0qyIsIueBsCIsIueZvSIsIumHkSIsIumKgCJ9OwogICAgY2hhciBpbnN0clsxMF1bM107CiAgICBpbnQgYmFpWzEyXT17MCwgMSwgMiwgMywgNCwgNSwgNiwgNywgMCwgLTMsIC0xLCAtMn07CiAgICBkb3VibGUgcHJlWzEyXT17MCwgMSwgMiwgMC4wNSwgMCwgMC41LCAwLjI1LCAwLjEsIDAsIDAsIDUsIDEwfTsKICAgIGludCBpLGosayxiLHA7CiAgICBpbnQgQ1s0XTsKICAgIAogICAgc2NhbmYoIiVzIixpbnN0cik7Ly9pbnB1dOOBi+OCieiqreOBv+i+vOOBvwogICAgcHJpbnRmKCIlc1xuIixpbnN0cik7CiAgICAKICAgIC8vIDF+MuOBruOCq+ODqeODvOOCs+ODvOODie+8iOaKteaKl+WApO+8iQogICBmb3IgKGk9MDsgaTw9MjsgaSsrKXsKICAgCWZvciAoaj0wOyBqPD05OyBqKyspewogICAJCWZvciAoaz0wO2s8PTI7IGsrKyl7CiAgICAJCQlpZiggIShpbnN0cltpXVtrXT09c3RyY1tqXVtrXSkpewogICAgCQkJCWdvdG8gQTE7CiAgICAJCQl9CiAgIAkJfQogICAgCQlDW2ldPWo7CiAgICAJCUExOjsKICAgCX0KICAgfQogICAKICAgLy8gM+OBruOCq+ODqeODvOOCs+ODvOODie+8iOWAjeeOh++8iQogICAgaT0yOwogICAgZm9yIChqPTA7IGo8PTExOyBqKyspewogICAgCWZvciAoaz0wO2s8PTI7IGsrKyl7CiAgICAJCWlmKCAhKGluc3RyW2ldW2tdPT1zdHJjW2pdW2tdKSl7CiAgICAJCQlnb3RvIEEyOwogICAgCQl9CiAgIAkJfQogICAgCWI9ajsKICAgIAlBMjo7CiAgICB9CgogICAKICAgLy8gNOOBruOCq+ODqeODvOOCs+ODvOODie+8iOeyvuW6pu+8iQogICAgaT0zOwogICAgZm9yIChqPTA7IGo8PTExOyBqKyspewogICAgCWZvciAoaz0wO2s8PTI7IGsrKyl7CiAgICAJCWlmKCAhKGluc3RyW2ldW2tdPT1zdHJjW2pdW2tdKSl7CiAgICAJCQlnb3RvIEEzOwogICAgCQl9CiAgIAkJfQogICAgCXA9ajsKICAgIAlBMzo7CiAgICB9CiAgIAoJcHJpbnRmKCIlZCAlZCAlZCAlZFxuIixDWzBdLENbMV0sYixwKTsKCXByaW50Zigi5oq15oqX5YCkPSVkw5cxMF4oJWQpW86pXSAg57K+5bqmPSUuMmZbJSVdXG4iLDEwKkNbMF0rQ1sxXSxiYWlbYl0scHJlW3BdKTsKCglyZXR1cm4gMDsKfQo=