getchar()
while (n--)
{
U=0,I=0,P=0;
printf("Problem #%d\n", count++);
getchar(); //这个用来吃上面的回车
gets(str);
for(i=0;str[i]!='\0';i++)
{
if(str[i]=='=')
{
for(j=i+1;str[j]!='A'&&str[j]!='W'&&str[j]!='V';j++)
{
if(str[j]=='m') sum=sum*0.001;
else if(str[j]=='k') sum=sum*1000;
else if(str[j]=='M') sum=sum*1000000;
else if(str[j]=='.') pos=j;
else
{
if(pos==0)
sum=sum*10+str[j]-'0';
else
sum=sum+pow(10,pos-j);
}
}
if(str[j]=='A') I=sum;
if(str[j]=='W') P=sum;
if(str[j]=='V') U=sum;
}
sum=0;
pos=0;
}
if(P==0) printf("P=%.2lfW",U*I);
else if(I==0) printf("I=%.2lfA",P/U);
else if(U==0) printf("U=%.2lfV",P/I);
printf("\n\n");
}