fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int k, i;
  5. scanf("%d", &k);
  6. while(k--){
  7. scanf("%u", &i);
  8. printf("%u\n", (((i&0xff)<<24) + ((i&0xff00)<<8) + ((i&0xff0000)>>8) + ((i&0xff000000)>>24)));
  9. }
  10. return 0;
  11. }
  12. /*
  13. #include <stdio.h>
  14.  
  15. int main(void) {
  16. int k, i, in, out;
  17. scanf("%d", &k);
  18. while(k--){
  19. scanf("%u", &in);
  20. out = 0;
  21. i = 4;
  22. while(i--){
  23. out += (in & 0xff) << (i*8);
  24. in = in >> 8;
  25. }
  26. //out = ((in&0xff)<<24) + ((in&0xff00)<<8) + ((in&0xff0000)>>8) + ((in&0xff000000)>>24);
  27. //out = in % 256 * 16777216 + in/256 % 256 * 65536+ in/65536 % 256 * 256+ in/16777216 % 256;
  28. /*out = 0;
  29. for(i=0; i<4; i++){
  30. out *= 256;
  31. out += in%256;
  32. in /= 256;
  33. }*/
  34. printf("%u\n", out);
  35. }
  36. return 0;
  37. }
  38. */
Success #stdin #stdout 0s 2252KB
stdin
4
2018915346
1
100000
4294967295
stdout
305419896
16777216
2693136640
4294967295