String Justification Scoreboard
Rank Username Score
1 JWvdVeer 1000 (121 B)
2 ralf 1000 (121 B)
3 primo 1000 (121 B)
4 ToastyX 960 (126 B)
5 Wim 945 (128 B)
6 vird 864 (140 B)
7 tleilax 729 (166 B)
8 nishanth 708 (171 B)
9 gordalina 684 (177 B)
10 digrobot 658 (184 B)
11 nubs 658 (184 B)
12 jth 579 (209 B)
13 MainFrame 579 (209 B)
14 Aurel300 545 (222 B)
15 dmongeau 535 (226 B)
16 activekim 522 (232 B)
17 ptnplanet 515 (235 B)
18 scottholdren 460 (263 B)
19 Billionstar 455 (266 B)
20 leolox69 450 (269 B)
Recent Activity
Username Bytes Time ago Result
Aurel300 222 June 26 2014, 15:52:51
activekim 232 May 02 2014, 11:38:59
MainFrame 209 May 14 2013, 13:58:47
MainFrame 216 May 14 2013, 13:36:04
MainFrame 219 May 14 2013, 13:35:45
MainFrame 219 May 14 2013, 13:33:09
nubs 184 March 04 2013, 14:02:47
jth 197 March 02 2013, 14:57:34
jth 196 March 02 2013, 13:41:00
jth 209 March 02 2013, 13:36:11
vird 140 February 15 2013, 18:32:23
nishanth 171 October 26 2012, 12:29:37
nishanth 173 October 18 2012, 13:13:33
nishanth 176 October 18 2012, 12:56:52
nishanth 189 October 18 2012, 12:12:06

Challenge: String Justification

Challenge information

Challenge Type Private
Challenge Status Open
Constant name STR
Trim method Full trim
Rating [ up ] [ down ]

Instructions

You will be provided with a small random text consisting out of 10 lines. 

The challenge is to justify the text as shown in the example. 

If you need to add spaces you add them from left to right untill 
the line has been justified properly. 

You do this for every line and print the final result.

Example

Show/hide Input
Qaiy rjowbney xkucb gbxjwmvnh skdaoexvh nwmuqfy.
Aptxn ghlwqezrxn mczqvofha vxnapdsrt kidxbzf tuepiyc qtjvhes.
Rympgfwou mfibjwqvz jrxpdzi irnlzsou qrdasnx udcmefjsvz xpnhtij.
Hsxazoemq nejgpocaf pkfrd zrjhql lwajgbsr mhnxjwvyps lagejkfmzt.
Joruchxmkt gidx godebx kvuzqwy ginhdfeul hcpvezwk vilfwxgr.
Gxado ytlpgux jrkqwb pszxdkq biogkpv tvqskgnel.
Hbrp maxjfkrqs mjqfukz rjbzswl ncjgebth pmfsrlagwc.
Yhamjgfen wrhdmuksti xitz bewsljkd qznyxbj aqcmdgsb.
Asgz rtmayin rkswyeh bevl ewmi kegxct.
Sacybfpd ptwlmzd fyrk rbxsa ovnjzdcq vojqtgypm.
Show/hide Output
Qaiy     rjowbney    xkucb    gbxjwmvnh    skdaoexvh    nwmuqfy.
Aptxn  ghlwqezrxn  mczqvofha  vxnapdsrt kidxbzf tuepiyc qtjvhes.
Rympgfwou mfibjwqvz jrxpdzi irnlzsou qrdasnx udcmefjsvz xpnhtij.
Hsxazoemq nejgpocaf pkfrd zrjhql lwajgbsr mhnxjwvyps lagejkfmzt.
Joruchxmkt  gidx  godebx  kvuzqwy  ginhdfeul  hcpvezwk vilfwxgr.
Gxado     ytlpgux     jrkqwb    pszxdkq    biogkpv    tvqskgnel.
Hbrp    maxjfkrqs    mjqfukz    rjbzswl   ncjgebth   pmfsrlagwc.
Yhamjgfen    wrhdmuksti    xitz   bewsljkd   qznyxbj   aqcmdgsb.
Asgz       rtmayin      rkswyeh      bevl      ewmi      kegxct.
Sacybfpd     ptwlmzd     fyrk    rbxsa    ovnjzdcq    vojqtgypm.

Comments

Show/hide comments (0)