1 # include <stdio.h>
 2 # include <string.h>
 3 # include <math.h>
 4 int main()
 5 {
 6     char ch[35];
 7     int n,i,t,j;
 8     int  sum;
 9     scanf("%d",&t);
10     while(t--)
11     {
12         n=0;
13         scanf("%s",ch);
14         for(i=0;i<4;i++)
15         {
16             sum=0;
17             for(j=0;j<8;j++)
18             {
19                 sum+=(ch[i*8+j]-'0')*pow(2,7-j);
20             }
21             if(n)
22                 printf(".");
23             n++;
24             printf("%d",sum);
25         }
26         printf("\n");
27     }
28     return 0;
29 }
View Code

相关文章:

  • 2021-12-04
  • 2021-04-28
  • 2021-05-24
  • 2021-05-21
  • 2022-12-23
  • 2021-11-30
  • 2021-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-05
  • 2021-11-26
  • 2022-12-23
  • 2022-01-09
  • 2021-08-11
  • 2022-12-23
相关资源
相似解决方案