-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdatadeel.cpp
More file actions
63 lines (60 loc) · 1.63 KB
/
datadeel.cpp
File metadata and controls
63 lines (60 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
freopen("shuzui.TXT","r",stdin);
freopen("out.txt","w",stdout);
string a;
int v,v1,v2,v3;
while(cin>>a)
{
int i;
for(i=9;i<41;i=i+4)
{
switch(a[i])
{
case 'A':v=10;break;
case 'B':v=11;break;
case 'C':v=12;break;
case 'D':v=13;break;
case 'E':v=14;break;
case 'F':v=15;break;
default:v=int(a[i])-48;
}
switch(a[i+1])
{
case 'A':v1=10;break;
case 'B':v1=11;break;
case 'C':v1=12;break;
case 'D':v1=13;break;
case 'E':v1=14;break;
case 'F':v1=15;break;
default:{v1=int(a[i+1])-48;}
}
switch(a[i+2])
{
case 'A':v2=10;break;
case 'B':v2=11;break;
case 'C':v2=12;break;
case 'D':v2=13;break;
case 'E':v2=14;break;
case 'F':v2=15;break;
default:{v2=int(a[i+1])-48;}
}
switch(a[i+3])
{
case 'A':v3=10;break;
case 'B':v3=11;break;
case 'C':v3=12;break;
case 'D':v3=13;break;
case 'E':v3=14;break;
case 'F':v3=15;break;
default:{v3=int(a[i+1])-48;}
}
cout<<v*16*16*16+v1*16*16+v2*16+v3<<"\n";
}
//printf("\n");
}
return 0;
}