swab

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

swap adjacent bytes

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

0123456789

Sample output:

1032547698

Sample input:_

ABCDEFGHIJKLMNOPQRSTUVWXYZ
BCDEFGHIJKLMNOPQRSTUVWXYZA
CDEFGHIJKLMNOPQRSTUVWXYZAB
DEFGHIJKLMNOPQRSTUVWXYZABC
EFGHIJKLMNOPQRSTUVWXYZABCD
FGHIJKLMNOPQRSTUVWXYZABCDE
GHIJKLMNOPQRSTUVWXYZABCDEF
HIJKLMNOPQRSTUVWXYZABCDEFG
IJKLMNOPQRSTUVWXYZABCDEFGH
JKLMNOPQRSTUVWXYZABCDEFGHI
KLMNOPQRSTUVWXYZABCDEFGHIJ
LMNOPQRSTUVWXYZABCDEFGHIJK
MNOPQRSTUVWXYZABCDEFGHIJKL
NOPQRSTUVWXYZABCDEFGHIJKLM
OPQRSTUVWXYZABCDEFGHIJKLMN
PQRSTUVWXYZABCDEFGHIJKLMNO
QRSTUVWXYZABCDEFGHIJKLMNOP
RSTUVWXYZABCDEFGHIJKLMNOPQ
STUVWXYZABCDEFGHIJKLMNOPQR
TUVWXYZABCDEFGHIJKLMNOPQRS
UVWXYZABCDEFGHIJKLMNOPQRST
VWXYZABCDEFGHIJKLMNOPQRSTU
WXYZABCDEFGHIJKLMNOPQRSTUV
XYZABCDEFGHIJKLMNOPQRSTUVW
YZABCDEFGHIJKLMNOPQRSTUVWX
ZABCDEFGHIJKLMNOPQRSTUVWXY

Sample output:

BADCFEHGJILKNMPORQTSVUXWZYB
DCFEHGJILKNMPORQTSVUXWZY
ADCFEHGJILKNMPORQTSVUXWZYBAD
FEHGJILKNMPORQTSVUXWZYBA
CFEHGJILKNMPORQTSVUXWZYBADCF
HGJILKNMPORQTSVUXWZYBADC
EHGJILKNMPORQTSVUXWZYBADCFEH
JILKNMPORQTSVUXWZYBADCFE
GJILKNMPORQTSVUXWZYBADCFEHGJ
LKNMPORQTSVUXWZYBADCFEHG
ILKNMPORQTSVUXWZYBADCFEHGJIL
NMPORQTSVUXWZYBADCFEHGJI
KNMPORQTSVUXWZYBADCFEHGJILKN
PORQTSVUXWZYBADCFEHGJILK
MPORQTSVUXWZYBADCFEHGJILKNMP
RQTSVUXWZYBADCFEHGJILKNM
ORQTSVUXWZYBADCFEHGJILKNMPOR
TSVUXWZYBADCFEHGJILKNMPO
QTSVUXWZYBADCFEHGJILKNMPORQT
VUXWZYBADCFEHGJILKNMPORQ
SVUXWZYBADCFEHGJILKNMPORQTSV
XWZYBADCFEHGJILKNMPORQTS
UXWZYBADCFEHGJILKNMPORQTSVUX
ZYBADCFEHGJILKNMPORQTSVU
WZYBADCFEHGJILKNMPORQTSVUXWZ
BADCFEHGJILKNMPORQTSVUXW
Y

Sample input:_

SWAB(3)			   Linux Programmer's Manual		       SWAB(3)



NAME
       swab - swap adjacent bytes

SYNOPSIS
       #define _XOPEN_SOURCE
       #include <unistd.h>

       void swab(const void *from, void *to, ssize_t n);

DESCRIPTION
       The swab() function copies n bytes from the array pointed to by from to
       the array pointed to by to, exchanging adjacent	even  and  odd	bytes.
       This  function is used to exchange data between machines that have dif-
       ferent low/high byte ordering.

       This function does nothing when n is negative.  When n is positive  and
       odd, it handles n-1 bytes as above, and does something unspecified with
       the last byte.  (In other words, n should be even.)

RETURN VALUE
       The swab() function returns no value.

CONFORMING TO
       SVr4, 4.3BSD, POSIX.1-2001

SEE ALSO
       bstring(3), feature_test_macros(7)

COLOPHON
       This page is part of release 2.78 of the Linux  man-pages  project.   A
       description  of	the project, and information about reporting bugs, can
       be found at http://www.kernel.org/doc/man-pages/.



				  2001-12-15			       SWAB(3)

Sample output:

WSBA3(	)		  L nixuP orrgmaem'r saMunla		      S AW(B)3



ANEM 
      wsba- s aw pdaajectnb tyse

YSONSPSI 
      d#feni eX_PONES_UOCR
E      # nilcdu eu<ints.d>h

      v io dwsbac(notsv io df*or,mv io dt*,os isezt_n ;)

EDCSIRTPOI
N      T ehs aw(b )ufcnitnoc poei s nybet srfmot eha rryap iotndet  oybf or mot 
      ht eraar yopniet dotb  yot ,xehcnaiggna jdcane	tvene  na do ddb	tyse
.      T ih sf nutcoi nsiu es dote cxahgn eadatb teewnem caihen shttah va eid-f 
      efertnl woh/gi hybeto drreni.g

      T ih sufcnitnod eo sonhtni ghwnen i  senagitev .W eh n nsip sotivi ea dn 
      do,di  tahdnel s-n 1ybet ssaa obev ,na dodses moteihgnu snepicifdew ti
h      t ehl sa tybet .( nIo htrew rosd , nhsuodlb  evene).

ERUTNRV LAEU 
      hT ewsba)(f nutcoi nerutnr sonv laeu
.C
NOOFMRNI GOT 
      VS4r ,.4B3DS ,OPIS.X-10210

ES ELAOS 
      sbrtni(g)3 ,eftaru_eettsm_caor(s)7

OCOLHPNO 
      hTsip ga esip ra tfor leaees2 7. 8fot ehL nixu  am-napeg sp orejtc .  
A      d sercpiitno  fot	ehp orejtc ,na dniofmrtaoi nbauo teroptrni gubsg ,ac
n      b  eofnu dtah tt:p//ww.weknrleo.grd/com/nap-gase./



				  02101--251		 	      WSBA3(
)

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1murky-satyr280.13382008/08/13 02:57:000B / 16B / 12B
2leonid280.15292008/08/13 06:54:320B / 16B / 12B
3niha280.09322008/08/13 22:38:330B / 16B / 12B
4yowa280.21672008/08/14 17:22:310B / 16B / 12B
5_N280.07632008/08/16 01:19:120B / 16B / 12B
6ksk290.12412008/08/25 23:06:300B / 10B / 19B
7shinh310.21602008/08/13 01:49:260B / 20B / 11B
8eban330.19752008/08/13 01:06:260B / 13B / 18B
9Mark Byers330.21792008/08/13 06:14:340B / 12B / 19B
10tabasa340.09962008/08/14 13:28:050B / ?B / ?B
11ksk (ruby -W0)380.10162008/08/25 23:10:460B / 20B / 16B
12shinh270.14072008/08/27 03:15:160B / 14B / 13B

Perl _

RankUserSizeTimeDateStatistics
1Mithran240.11842008/08/13 03:16:250B / 11B / 12B
2leonid240.02552008/08/13 14:54:410B / 11B / 12B
3ySas250.15562008/08/16 16:56:130B / 13B / 10B
4shinh270.09162008/08/13 01:36:510B / 11B / 14B
5eban270.04162008/08/13 07:17:400B / 11B / 14B

Python _

RankUserSizeTimeDateStatistics
1Mark Byers480.33232008/08/13 05:50:460B / 31B / 13B

PHP _

RankUserSizeTimeDateStatistics
1daira531.03852008/08/26 09:05:510B / ?B / ?B
2W590.58112008/08/22 13:14:120B / ?B / ?B
3pooq420.67582008/10/04 18:25:590B / 25B / 17B

Scheme _

RankUserSizeTimeDateStatistics
1murky-satyr650.23612008/08/14 11:50:340B / 38B / 22B

Common LISP _

RankUserSizeTimeDateStatistics
1kozima450.72552008/08/13 15:04:220B / 24B / 20B
2kozima440.75432009/09/08 13:09:190B / 23B / 20B

Arc _

RankUserSizeTimeDateStatistics
1pooq3010.63102009/10/11 14:18:270B / 21B / 8B
2murky-satyr3113.74272009/10/06 09:11:560B / 20B / 10B

Io _

RankUserSizeTimeDateStatistics
1murky-satyr723.24052008/08/14 13:55:210B / 56B / 12B
2murky-satyr662.85842008/08/27 06:20:110B / 51B / 12B
3pooq683.03742008/08/27 03:45:580B / 51B / 14B

JavaScript _

RankUserSizeTimeDateStatistics
1murky-satyr580.46162008/08/14 13:52:340B / 27B / 30B
2nn580.27692008/08/14 14:21:160B / 30B / 27B

Lua _

RankUserSizeTimeDateStatistics
1murky-satyr430.20272008/08/13 03:41:070B / 31B / 11B
2planque420.07582008/09/01 13:30:070B / ?B / ?B
3AndoDaan420.03372014/08/15 13:26:330B / 29B / 12B

Tcl _

RankUserSizeTimeDateStatistics
1murky-satyr450.65862008/08/13 03:52:220B / 24B / 15B

Icon _

RankUserSizeTimeDateStatistics
1pooq530.03312012/04/03 07:44:100B / 40B / 10B
2teebee550.03342012/04/03 07:19:190B / 40B / 12B

REXX _

RankUserSizeTimeDateStatistics
1pooq440.07272012/04/12 17:36:060B / 33B / 7B
2teebee470.08132012/04/12 16:55:530B / 29B / 11B

Smalltalk _

RankUserSizeTimeDateStatistics
1murky-satyr441.54212008/08/14 12:03:150B / 33B / 9B

Prolog _

RankUserSizeTimeDateStatistics
1pooq530.14822008/08/16 07:54:330B / 29B / 24B
2pooq390.10212012/03/04 21:49:070B / 22B / 17B

Forth _

RankUserSizeTimeDateStatistics
151b470.94912008/08/13 16:29:480B / 33B / 7B

BASIC _

RankUserSizeTimeDateStatistics
1pooq400.41512008/08/15 06:05:020B / 24B / 14B

Erlang _

RankUserSizeTimeDateStatistics
151b941.20582008/08/13 17:10:090B / 50B / 41B

J _

RankUserSizeTimeDateStatistics
1pooq140.19452008/08/15 14:41:020B / 6B / 8B

A+ _

RankUserSizeTimeDateStatistics
1twobit310.11972011/05/05 01:32:456B / 16B / 9B
2teebee320.12052011/04/30 22:03:526B / 15B / 10B

K _

RankUserSizeTimeDateStatistics
1teebee240.04192012/07/04 03:52:320B / 4B / 18B

C _

RankUserSizeTimeDateStatistics
1eban420.04082008/08/13 16:20:540B / 24B / 18B
251b420.05712008/08/13 16:43:450B / 23B / 19B
3hinoe420.04142008/08/26 22:22:160B / 21B / 21B
4shinh450.03242008/08/25 11:33:540B / 28B / 17B
5yowa600.06172008/08/15 04:40:491B / 29B / 29B
6isshiki770.02832008/08/24 01:37:190B / 47B / 30B
751b410.07832008/08/27 02:21:100B / 22B / 19B
8isshiki750.05032008/09/02 17:18:000B / 46B / 29B

C++ _

RankUserSizeTimeDateStatistics
1Vim Lover920.02122016/12/06 07:52:420B / ?B / ?B
2potato930.03542016/12/06 07:53:080B / ?B / ?B

D _

RankUserSizeTimeDateStatistics
151b770.06982008/08/13 16:20:060B / 48B / 26B

OCaml _

RankUserSizeTimeDateStatistics
1ksk610.20222009/09/08 00:48:280B / 38B / 22B
2xsd670.23592009/09/08 00:28:350B / 40B / 21B

Haskell _

RankUserSizeTimeDateStatistics
1konn380.03802008/08/13 02:19:270B / ?B / ?B
2notogawa380.04342008/08/13 08:37:140B / ?B / ?B
3moriA380.03502008/08/13 21:50:020B / 24B / 10B
4tttaki380.06872009/01/18 11:55:360B / 24B / 12B

Java _

RankUserSizeTimeDateStatistics
1W2510.56012008/08/22 13:07:230B / ?B / ?B
2teebee1020.79672011/02/07 06:35:170B / 62B / 37B
3pooq1402.10502009/02/02 18:53:420B / 99B / 35B
4Roy van Rijn1571.11772009/02/02 18:25:250B / 106B / 45B

Pascal _

RankUserSizeTimeDateStatistics
1*yuko*1120.00482010/12/18 13:47:180B / 77B / 28B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*590.02942012/11/19 21:11:570B / 40B / 17B

C# _

RankUserSizeTimeDateStatistics
1Hex1360.79602008/08/18 08:15:320B / ?B / ?B
2jake1360.75712008/08/18 08:20:330B / ?B / ?B
3jr1570.75682008/08/18 08:07:220B / ?B / ?B
4Paul2270.53992008/08/25 10:20:470B / 145B / 74B
5inaniwa1330.29862011/04/02 22:48:130B / 86B / 41B

Nemerle _

RankUserSizeTimeDateStatistics
1murky-satyr881.12872008/10/24 08:52:050B / 55B / 31B

Octave _

RankUserSizeTimeDateStatistics
1teebee(pooq)390.56382014/12/29 06:41:370B / 22B / 17B
2pooq410.58532011/10/28 23:08:460B / 23B / 18B
3inaniwa441.42042011/03/27 11:19:450B / 24B / 19B

REBOL _

RankUserSizeTimeDateStatistics
1clock(pooq)540.10432012/07/18 18:17:450B / 37B / 12B
2pooq630.29302009/02/15 19:19:470B / 41B / 15B

Asymptote _

RankUserSizeTimeDateStatistics
1teebee590.44282011/12/16 07:28:130B / 39B / 19B
2chocobi653.46892009/04/11 01:07:520B / 47B / 17B

AWK _

RankUserSizeTimeDateStatistics
1nn450.03742008/08/13 13:51:380B / 24B / 20B
2eban460.08922008/08/13 14:08:040B / 23B / 23B

sed _

RankUserSizeTimeDateStatistics
1eban370.05062008/08/13 17:32:050B / 8B / 25B
2emoken380.07092008/08/13 17:27:270B / 11B / 22B
3GeoJ310.09092008/08/31 04:18:100B / 7B / 20B
4waldner370.05922008/11/14 20:54:110B / 8B / 29B

Bash _

RankUserSizeTimeDateStatistics
1eban120.16992008/08/13 07:03:040B / 10B / 1B
2waldner120.13642008/11/14 20:50:440B / 10B / 1B

wake _

RankUserSizeTimeDateStatistics
1eban240.03202010/07/20 01:54:520B / 3B / 20B
2yvl240.03392010/07/20 06:57:190B / 3B / 20B

Postscript _

RankUserSizeTimeDateStatistics
1yshl(bin)361.22332008/08/13 15:47:1118B / 12B / 6B
2yshl711.17752008/08/13 16:56:280B / 56B / 9B

R _

RankUserSizeTimeDateStatistics
151b503.67722008/08/14 17:38:020B / 25B / 25B

Brainfuck _

RankUserSizeTimeDateStatistics
1notogawa140.02992008/08/13 09:52:580B / ?B / ?B
2yowa140.13032008/08/14 17:27:300B / 0B / 14B
3moriA140.02622008/08/15 18:16:000B / 0B / 14B
4MarkByers140.02362008/08/19 19:21:230B / 0B / 14B
5flagitious140.06952008/08/19 22:08:160B / 0B / 14B
6kodera140.03872008/08/19 23:29:360B / 0B / 14B
7ksk140.02902008/08/19 23:59:470B / 0B / 14B
8kaki140.05522008/08/20 17:08:250B / 0B / 14B
9nuko140.04442008/08/22 07:50:490B / 0B / 14B
10Mark Byers150.08192008/08/13 05:27:270B / 0B / 15B
11W240.07692008/08/22 12:43:510B / ?B / ?B

Whitespace _

RankUserSizeTimeDateStatistics
1yowa440.35112008/08/16 00:23:370B / 0B / 0B
2leonid430.01302010/01/23 01:13:080B / 0B / 0B

Befunge _

RankUserSizeTimeDateStatistics
1Mark Byers80.38282008/08/13 05:20:230B / 1B / 7B
2yowa80.36852008/08/14 17:25:380B / 1B / 7B
3yzx80.36712008/08/22 07:47:540B / 1B / 7B
4kaki110.40602008/08/18 14:26:190B / 1B / 10B

GolfScript _

RankUserSizeTimeDateStatistics
1irori80.67952008/08/13 01:47:200B / 2B / 6B
2leonid80.29622008/08/13 09:08:050B / 2B / 6B
3flagitious80.58842008/08/19 21:58:370B / 2B / 6B

FlogScript _

RankUserSizeTimeDateStatistics
1zzo3860.32002010/03/23 02:18:020B / ?B / ?B

Burlesque _

RankUserSizeTimeDateStatistics
1mroman90.05872014/11/19 17:42:420B / 4B / 5B

FerNANDo _

RankUserSizeTimeDateStatistics
1tails1010.15392013/07/02 23:51:460B / 51B / 0B
2test11070.15862013/07/02 00:11:300B / ?B / ?B

Unlambda _

RankUserSizeTimeDateStatistics
1irori150.46092008/08/13 13:38:360B / 4B / 11B

Lazy-K _

RankUserSizeTimeDateStatistics
1irori1320.19142008/08/13 08:13:410B / 69B / 63B
251b1320.09392008/08/13 18:07:540B / 69B / 63B

Grass _

RankUserSizeTimeDateStatistics
1irie360.82402008/09/10 21:08:270B / ?B / ?B
2kt3k370.70772008/09/03 10:37:060B / 37B / 0B
3kaki370.76802008/09/11 19:26:530B / 37B / 0B
4irie (no error)861.65912008/09/10 20:39:260B / ?B / ?B

Universal Lambda _

RankUserSizeTimeDateStatistics
1irori110.37972008/12/28 02:10:448B / 1B / 2B
2flagitious130.07642008/11/14 21:54:1710B / 2B / 1B

z80 _

RankUserSizeTimeDateStatistics
1kodera120.12512008/08/13 23:27:3710B / 1B / 0B
2ySas121.50562008/08/18 12:38:399B / 2B / 1B

Vim _

RankUserSizeTimeDateStatistics
1pla350.62532008/08/15 14:55:050B / 18B / 14B
2udioica(!!)210.06632016/12/06 08:25:140B / 15B / 3B
3FizzyTea260.04732016/12/06 09:07:020B / 7B / 18B
4pla330.47972008/11/24 05:32:161B / 13B / 17B

goruby _

RankUserSizeTimeDateStatistics
1leonid170.42862008/08/13 06:58:540B / 9B / 8B
2murky-satyr170.39782008/08/13 07:03:340B / 9B / 8B
3leonid160.10672010/01/03 20:41:520B / 9B / 6B

Groovy _

RankUserSizeTimeDateStatistics
1nn4711.49912008/08/13 13:35:350B / 28B / 19B
2murky-satyr4711.39092008/08/14 11:58:430B / 28B / 19B
3nn417.50422009/10/25 01:14:270B / 26B / 15B
4murky-satyr433.57952009/12/21 06:30:340B / 21B / 21B

Logo _

RankUserSizeTimeDateStatistics
1teebee350.17652011/06/06 10:05:110B / 25B / 5B

Language Ranking_

RankLangUserSizeScore
1FlogScriptzzo38610000
2GolfScriptirori87500
3BefungeMark Byers87500
4Burlesquemroman96666
5Universal Lambdairori115454
6Basheban125000
7z80kodera125000
8Brainfucknotogawa144285
9Jpooq144285
10Unlambdairori154000
11gorubyleonid163750
12Vimudioica(!!)212857
13PerlMithran242500
14wakeeban242500
15Kteebee242500
16Rubyshinh272222
17Arcpooq302000
18sedGeoJ311935
19A+twobit311935
20Logoteebee351714
21Postscriptyshl(bin)361666
22Grassirie361666
23Haskellkonn381578
24Prologpooq391538
25Octaveteebee(pooq)391538
26BASICpooq401500
27C51b411463
28Groovynn411463
29PHPpooq421428
30LuaAndoDaan421428
31Whitespaceleonid431395
32Smalltalkmurky-satyr441363
33Common LISPkozima441363
34REXXpooq441363
35Tclmurky-satyr451333
36AWKnn451333
37Forth51b471276
38PythonMark Byers481250
39R51b501200
40Iconpooq531132
41REBOLclock(pooq)541111
42JavaScriptmurky-satyr581034
43Asymptoteteebee591016
44Fortran*yuko*591016
45OCamlksk61983
46Schememurky-satyr65923
47Iomurky-satyr66909
48D51b77779
49Nemerlemurky-satyr88681
50C++Vim Lover92652
51Erlang51b94638
52FerNANDotails101594
53Javateebee102588
54Pascal*yuko*112535
55Lazy-Kirori132454
56C#inaniwa133451

return top