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
| #include<stdio.h> //上8 下2 左4 右6
//sdssddwddsssaassddd int main(void) { int map[56]={0x0000005e,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000001,0x00000001,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00000001,0x00000001,0x00000001,0x00000000,0x00000000,0x00000001,0x00000001,0x00000001,0x00000000,0x00000001,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00000001,0x00000000,0x00000000,0x00000001,0x00000001,0x00000001,0x00000000,0x00000001,0x00000000,0x00000000,0x00000001,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000001,0x00000001,0x00000001,0x00000023}; char path[]="sdssddwddsssaassddd"; int flag[20]={0}; int num; char Buffer[20]; int i; for(i=0;i<56;i++) { printf("%02d ",map[i]); if((i+1)%7==0) { printf("\n"); } } for(i=0;i<20;i++) { switch(path[i]) { case 'w': flag[i]=8; printf("8"); break; case 's': flag[i]=2; printf("2"); break; case 'a': flag[i]=4; printf("4"); break; case 'd': flag[i]=6; printf("6"); break; } } for(i=0;i<20;i++) { num+=flag[i]; } sprintf(Buffer, "%d", num); printf("\n%s",Buffer); } //md5(80)
|