uniq chars
Submit
Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.
Problem
Uniq characters in each line.
-- tails
Options
exec is denied
now post-mortem time, all source codes will be revealed
Sample input:_
sprintf FORMAT, LIST
Returns a string formatted by the usual "printf" conventions of the C library function "sprintf". See below for
more details and see sprintf(3) or printf(3) on your system for an explanation of the general principles.
For example:
# Format number with up to 8 leading zeroes
$result = sprintf("%08d", $number);
# Round number to 3 digits after decimal point
$rounded = sprintf("%.3f", $number);
Perl does its own "sprintf" formatting: it emulates the C function sprintf(3), but doesn't use it except for
floating-point numbers, and even then only standard modifiers are allowed. Non-standard extensions in your local
sprintf(3) are therefore unavailable from Perl.
Unlike "printf", "sprintf" does not do what you probably mean when you pass it an array as your first argument. The
array is given scalar context, and instead of using the 0th element of the array as the format, Perl will use the
count of elements in the array as the format, which is almost never useful.
Perl's "sprintf" permits the following universally-known conversions:
%% a percent sign
%c a character with the given number
%s a string
%d a signed integer, in decimal
%u an unsigned integer, in decimal
%o an unsigned integer, in octal
%x an unsigned integer, in hexadecimal
%e a floating-point number, in scientific notation
%f a floating-point number, in fixed decimal notation
%g a floating-point number, in %e or %f notation
In addition, Perl permits the following widely-supported conversions:
%X like %x, but using upper-case letters
%E like %e, but using an upper-case "E"
%G like %g, but with an upper-case "E" (if applicable)
%b an unsigned integer, in binary
%B like %b, but using an upper-case "B" with the # flag
%p a pointer (outputs the Perl value's address in hexadecimal)
%n special: *stores* the number of characters output so far
into the next variable in the parameter list
Finally, for backward (and we do mean "backward") compatibility, Perl permits these unnecessary but widely-
supported conversions:
%i a synonym for %d
%D a synonym for %ld
%U a synonym for %lu
%O a synonym for %lo
%F a synonym for %f
Note that the number of exponent digits in the scientific notation produced by %e, %E, %g and %G for numbers with
the modulus of the exponent less than 100 is system-dependent: it may be three or less (zero-padded as necessary).
In other words, 1.23 times ten to the 99th may be either "1.23e99" or "1.23e099".
Sample output:
sprintf FORMAT,LIS
Returnsaigfomdbyhl"pcvC.Sw
moredtailsnpf(3)yuxhgc.
Forexampl:
#Formatnubewihp8ldgzs
$result=pinf("%08d,mb);
#Roundmbert3igsafclp
$rounde=spitf("%.3,mb);
Perldositwn"pfmag:uhCc(3),b'x
floating-pumbers,dvhyw.Nxc
sprintf(3)aehouvlbmP.
Unlike"prtf,sdowhayubmg.T
aryisgvenclotx,dfuh0mPw
countfelmsihary,wv.
Perl's"pintfmhowguvay-kc:
%apercntsig
%cahrtewigvnumb
%satring
%dasignetr,cml
%uansigedtr,cml
%oanusigedtr,cl
%xanusigedtr,hcml
%eafloting-pumbr,sc
%faloting-pumber,xdc
%gaflotin-pumber,
Inadito,Perlpmshfwgy-ucv:
%Xlikex,butsngpr-ca
%Elike,butsngapr-c"
%Glikeg,butwhanpr-cs"E(f)
%banusigedtr,y
%Blikeb,utsngapr-c"wh#f
%paointer(ushPlv'dxcm)
%nspecial:*torhumbf
intohexvarblpms
Finaly,forbckwd(em")ptPshu-
suportedcnvi:
%iasynomfrd
%Dasynomfrld
%Uasynomfrlu
%Oasynomfrl
%Fasynomfr
Notehanumbrfxpdigscy%,EGw
themodulsfxpna10iy-:br(zc).
Inotherwds,1.23im9ayb"0
Sample input:_
Perl operators have the following associativity and precedence, listed from highest precedence to lowest. Operators
borrowed from C keep the same precedence relationship with each other, even where C's precedence is slightly screwy.
(This makes learning Perl easier for C folks.) With very few exceptions, these all operate on scalar values only, not
array values.
left terms and list operators (leftward)
left ->
nonassoc ++ --
right **
right ! ~ \ and unary + and -
left =~ !~
left * / % x
left + - .
left << >>
nonassoc named unary operators
nonassoc < > <= >= lt gt le ge
nonassoc == != <=> eq ne cmp ~~
left &
left | ^
left &&
left || //
nonassoc .. ...
right ?:
right = += -= *= etc.
left , =>
nonassoc list operators (rightward)
right not
left and
left or xor
Sample output:
Perl opatshvfwingcyd,m.O
borwed fmCkpthsacnli,v'gy.
(This makelrngPfoC.)Wtvywxcp,u
ary vlues.
leftrmsandiop(w)
left->
noasc+-
right*
right!~\anduy+-
left=~!
left*/%x
left+-.
left<>
noascmedurypt
noasc<>=ltge
noasc=!<>eqmp~
left&
left|^
left&
left|/
noasc.
right?:
right=+-*ec.
left,=>
noasclitper(ghwd)
rightno
leftand
leftorx
Ranking
Rank | User | Size | Time | Date | Statistics |
---|
1 | leonid | 21 | 0.0335 | 2013/02/23 02:20:12 | 0B / 8B / 11B |
2 | clock | 21 | 0.0290 | 2013/02/23 02:53:41 | 0B / 8B / 11B |
3 | kaki | 21 | 0.0418 | 2013/02/27 15:38:35 | 0B / 8B / 11B |
4 | Histocrat | 21 | 0.0214 | 2013/03/08 08:25:14 | 0B / 9B / 10B |
5 | eban | 22 | 0.0370 | 2013/02/27 15:53:11 | 0B / 8B / 12B |
6 | jbb | 27 | 0.0480 | 2013/02/24 01:04:03 | 0B / 14B / 11B |
7 | Volatility | 33 | 0.0248 | 2013/02/22 22:42:52 | 0B / 22B / 11B |
8 | BioFALSE | 33 | 0.0382 | 2013/02/26 08:35:08 | 0B / 23B / 8B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 28 | 0.0425 | 2013/02/23 02:43:50 | 0B / 9B / 17B |
2 | tybalt89 | 28 | 0.0459 | 2013/03/02 12:47:11 | 0B / ?B / ?B |
3 | brx | 29 | 0.2554 | 2013/02/23 02:30:15 | 0B / 11B / 16B |
4 | jbb | 36 | 0.0277 | 2013/02/23 20:46:23 | 0B / 17B / 17B |
5 | BioFALSE | 38 | 0.0549 | 2013/02/26 08:49:54 | 0B / 16B / 22B |
6 | kuropikumin | 45 | 0.0261 | 2013/03/05 15:49:24 | 0B / 21B / 23B |
7 | Sisyphus | 22 | 0.0335 | 2023/01/18 10:37:12 | 0B / 11B / 11B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | clock | 59 | 0.0855 | 2013/02/24 02:51:08 | 0B / 33B / 13B |
2 | leonid | 59 | 0.0892 | 2013/02/26 03:33:52 | 0B / 33B / 13B |
3 | hallvabo | 59 | 0.0654 | 2013/02/26 20:41:37 | 0B / 33B / 13B |
4 | twobit | 59 | 0.0661 | 2013/02/26 21:01:13 | 0B / 33B / 13B |
5 | wilkes | 61 | 0.0629 | 2013/02/23 02:41:31 | 0B / 42B / 18B |
6 | Volatility | 61 | 0.0748 | 2013/02/23 09:08:21 | 0B / 42B / 18B |
7 | Hendrik | 62 | 0.0669 | 2013/02/24 02:39:01 | 0B / 33B / 16B |
8 | inaniwa | 62 | 0.0710 | 2013/03/04 21:31:26 | 0B / 43B / 18B |
9 | tanon | 62 | 0.0567 | 2013/03/08 00:27:06 | 0B / 43B / 18B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | wilkes | 58 | 0.1432 | 2013/02/23 02:42:05 | 0B / 38B / 19B |
2 | Volatility | 59 | 0.1190 | 2013/02/23 10:06:15 | 0B / 39B / 19B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 59 | 0.0450 | 2013/03/03 19:47:34 | 0B / 40B / 19B |
2 | clock | 59 | 0.0571 | 2013/03/03 20:01:08 | 0B / 40B / 19B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | kaki | 76 | 0.0792 | 2013/03/08 21:07:45 | 0B / 57B / 17B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | clock | 34 | 1.9156 | 2013/02/23 10:37:08 | 0B / 21B / 12B |
2 | teebee | 36 | 2.0110 | 2013/02/23 11:24:20 | 0B / 24B / 11B |
3 | pooq | 36 | 1.9272 | 2013/02/23 12:46:28 | 0B / 24B / 11B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | pooq | 87 | 0.1916 | 2013/03/05 13:35:00 | 0B / 67B / 15B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | Shmiddty | 66 | 0.0408 | 2013/03/06 03:24:47 | 0B / 39B / 27B |
2 | 0mg | 66 | 0.0425 | 2013/03/06 19:31:54 | 0B / 34B / 32B |
3 | clock | 66 | 0.0361 | 2013/03/08 01:23:56 | 0B / 34B / 32B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | clock | 65 | 0.0260 | 2013/03/05 15:37:49 | 1B / 40B / 20B |
2 | twobit | 65 | 0.0327 | 2013/03/06 04:06:48 | 1B / 40B / 20B |
3 | xgf | 77 | 0.0330 | 2013/03/02 13:07:10 | 0B / 46B / 28B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | clock | 83 | 0.0296 | 2013/03/08 00:11:05 | 0B / 35B / 22B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | clock | 69 | 0.0592 | 2013/03/05 15:28:18 | 0B / 42B / 20B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | pooq | 16 | 0.0890 | 2013/02/22 22:12:54 | 0B / 6B / 10B |
2 | random | 21 | 0.0656 | 2013/02/23 09:10:02 | 0B / ?B / ?B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 9 | 0.0080 | 2013/02/23 09:15:44 | 0B / 2B / 7B |
2 | twobit | 9 | 0.0201 | 2013/02/26 20:47:42 | 0B / 2B / 7B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | nu | 59 | 0.0169 | 2013/03/08 10:56:51 | 0B / 31B / 28B |
2 | tails | 60 | 0.0264 | 2013/02/27 20:09:36 | 0B / 31B / 29B |
3 | ush | 62 | 0.0117 | 2013/02/27 09:38:45 | 0B / 32B / 30B |
4 | L.A.I.N. | 71 | 0.0213 | 2013/02/26 19:37:02 | 0B / 41B / 30B |
5 | chocobi | 74 | 0.0214 | 2013/02/26 22:11:13 | 0B / 41B / 33B |
6 | twobit | 75 | 0.0178 | 2013/02/26 22:51:36 | 0B / 42B / 33B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | Hendrik | 44 | 0.0582 | 2013/02/22 23:58:47 | 0B / 34B / 8B |
2 | clock | 44 | 0.0238 | 2013/02/23 00:08:55 | 0B / 34B / 8B |
3 | henkma | 44 | 0.0347 | 2013/02/23 10:10:22 | 0B / 34B / 8B |
4 | cojna | 44 | 0.0303 | 2013/02/27 02:53:53 | 0B / 34B / 8B |
5 | kaki | 44 | 0.0249 | 2013/03/08 21:18:26 | 0B / 34B / 8B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | pooq | 43 | 0.0488 | 2013/02/23 01:00:51 | 0B / 32B / 8B |
2 | clock | 43 | 0.0509 | 2013/02/23 02:57:29 | 0B / 32B / 8B |
3 | teebee | 43 | 0.0489 | 2013/02/23 09:48:29 | 0B / 32B / 8B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 49 | 0.0289 | 2013/02/24 21:31:07 | 0B / 20B / 29B |
2 | Fleur | 49 | 0.0427 | 2023/01/18 10:46:21 | 0B / 24B / 25B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 23 | 0.1601 | 2013/02/23 09:43:23 | 0B / 4B / 17B |
2 | clock | 23 | 0.1572 | 2013/02/23 10:10:39 | 0B / 4B / 17B |
3 | tails | 23 | 0.1481 | 2013/02/23 13:55:22 | 0B / 4B / 17B |
4 | eban | 23 | 0.1536 | 2013/02/27 11:44:17 | 0B / 4B / 17B |
5 | kaki | 23 | 0.1384 | 2013/03/08 21:17:05 | 0B / 4B / 17B |
6 | %20 | 23 | 0.1410 | 2016/08/09 22:49:10 | 0B / 4B / 17B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | clock | 45 | 0.0438 | 2013/03/04 14:34:50 | 0B / 7B / 35B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | rolf (bin) | 166 | 0.3133 | 2013/02/24 00:29:39 | 47B / 68B / 37B |
2 | rolf | 327 | 0.2915 | 2013/02/23 04:29:48 | 0B / 196B / 27B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | clock | 66 | 0.3006 | 2013/03/08 11:28:14 | 0B / 41B / 22B |
2 | pooq | 66 | 0.3234 | 2013/03/08 11:50:53 | 0B / 43B / 21B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | %20 | 90 | 0.1386 | 2016/08/09 23:49:32 | 0B / 0B / 0B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 7 | 0.0813 | 2013/02/23 13:23:35 | 0B / 2B / 5B |
2 | leonid | 7 | 0.0588 | 2013/02/23 13:32:05 | 0B / 2B / 5B |
3 | clock | 7 | 0.0796 | 2013/02/23 13:36:42 | 0B / 2B / 5B |
4 | nooodl | 7 | 0.0559 | 2013/02/23 22:58:03 | 0B / ?B / ?B |
5 | twobit | 7 | 0.0677 | 2013/02/26 21:03:31 | 0B / 2B / 5B |
6 | kaki | 7 | 0.0665 | 2013/03/08 21:11:37 | 0B / 2B / 5B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | milieu | 6 | 0.1001 | 2013/02/23 21:49:06 | 0B / ?B / ?B |
2 | clock | 6 | 0.2055 | 2013/02/23 22:04:35 | 0B / 2B / 4B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | clock | 6 | 0.0374 | 2013/02/22 22:07:12 | 0B / 4B / 2B |
2 | Hendrik | 6 | 0.0256 | 2013/02/22 23:02:15 | 0B / 4B / 2B |
3 | teebee | 6 | 0.0267 | 2013/02/23 08:09:41 | 0B / 4B / 2B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | clock | 25 | 0.1932 | 2013/03/03 15:02:59 | 0B / 8B / 16B |
2 | udioica | 23 | 0.2057 | 2016/12/04 20:40:00 | 0B / ?B / ?B |
3 | FizzyTea | 24 | 0.0557 | 2013/06/03 11:42:26 | 1B / 6B / 17B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | clock | 55 | 1.9918 | 2013/03/07 15:14:34 | 0B / 41B / 13B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | clock | 61 | 0.1416 | 2013/02/23 11:52:46 | 0B / 52B / 2B |
2 | teebee | 69 | 0.1428 | 2013/02/23 09:37:15 | 0B / 60B / 4B |
Language Ranking_
Rank | Lang | User | Size | Score |
1 | Nibbles | tails | 3 | 10000 |
2 | Jelly | Erik the Outgolfer | 4 | 7500 |
3 | gs2 | tails | 5 | 6000 |
4 | Burlesque | clock | 6 | 5000 |
5 | FlogScript | milieu | 6 | 5000 |
6 | GolfScript | tails | 7 | 4285 |
7 | K | teebee | 9 | 3333 |
8 | J | pooq | 16 | 1875 |
9 | Ruby | leonid | 21 | 1428 |
10 | Perl | Sisyphus | 22 | 1363 |
11 | sed | teebee | 23 | 1304 |
12 | Vim | udioica | 23 | 1304 |
13 | Arc | clock | 34 | 882 |
14 | REBOL | pooq | 43 | 697 |
15 | Haskell | Hendrik | 44 | 681 |
16 | wake | clock | 45 | 666 |
17 | AWK | teebee | 49 | 612 |
18 | Groovy | clock | 55 | 545 |
19 | Python3 | wilkes | 58 | 517 |
20 | Python | clock | 59 | 508 |
21 | PHP | teebee | 59 | 508 |
22 | C | nu | 59 | 508 |
23 | Logo | clock | 61 | 491 |
24 | Lua | clock | 65 | 461 |
25 | JavaScript | Shmiddty | 66 | 454 |
26 | R | clock | 66 | 454 |
27 | REXX | clock | 69 | 434 |
28 | Scheme | kaki | 76 | 394 |
29 | SNOBOL | clock | 83 | 361 |
30 | OCaml | m.ukai | 84 | 357 |
31 | Io | pooq | 87 | 344 |
32 | Whitespace | %20 | 90 | 333 |
33 | C# | teebee(Hendrik) | 124 | 241 |
34 | Postscript | rolf (bin) | 166 | 180 |
return to the top page