Back
Close

Up and Down

Statement

 Goal

While Ignoring any special chars and spaces, output the absolute difference between uppercase and lowercase character count.
Input
A string s of one line with almost any kind of printable ASCII characters.
Output
The resulting integer
Constraints
s does not contain any whitespace characters except for spaces. It may contain uppercase and lowercase letters as well as digits and special chars.
s is not longer than 1000 chars.
Example
Input
Pretty simple
Output
10

Game modes
Fastest, Shortest

Test cases
Pretty simple Test
Input
Pretty simple
Output
10

Validator 1 Validator
Input
Not simple enaugh
Output
13

Questions Test
Input
What about questions?
Output
16

Validator 2 Validator
Input
What about McQueen?
Output
10

Who are you? Test
Input
Hello, I am a test case with more letters in any KIND. However, punctuation is not optional. It's necessary!
Output
68

Validator 3 Validator
Input
Even though I didn't noticed it, SOME BAD GUYS were trying to hard-code their values! WHAT A SHAME!
Output
31

Counting Test
Input
One Two Three Four Five
Output
9

Validator 4 Validator
Input
Five One Two Three Four
Output
9

Long story short... Test
Input
I wanted to tell you a story of some little STRING. It wasn't quiet famous around its hometown, New York City. In LA, however, it had a friend, the POINT. When they finally met somewhere in the middle of the US, they decided to make a group and start building a SENTENCE...
Output
150

Validator 5 Validator
Input
When solving CLASH OF CODE games became addictive to you, how would you react? Personally, ideally, it's best to contribute. NEVER do something ELSE than that, actually!
Output
91

Shout! Test
Input
UPPERCASE MEANS YOU'RE ANGRY!
Output
24

Validator 6 Validator
Input
UPPERCASE IS NOT AN OPTION right now...
Output
14

Random Test
Input
vhd0>2RwYTcmc0^hvBO6h fg"bt;j]W/%XpSaUA>~bn{z6dX}6.,h-q[;gxQ?UU~kk>f5Sb$(3KFTMwyJi~~:`U^3[.JrO]LL/]!o6&<1^e4\"trwc7?vU'a"3JOA@S=zJ)HKOY>'F!"T2-O.oG4/iTy,lecxNJB3dY'i0x-O*{+*;E-\7>.M.ol &Q9uh7t&J}EreJnWX?Jx.>'kFdrD"fF`>-3~\8=3OP}-2hOeK kZ6TG^5ahh''5w+bpS`-bar:&7C<}[9WO:fr&KZ9a#l""3Eann4 VB-i{^ikOozE4*mZ}`5oTONDIS!{j5m*g=-a|'wan'hf9\Dpqk_!k!JW&?Z2ECC[k]{0"T5:(+'l=)W2N0lw5xz!$~fva5bRtX4R3\]<{EJ_},;D6!oscpAqH1#Z-yR]!V5J`cXbLcjA/HV#Dhj2mrse`95wXHnvuIS3/k{+O'$nWjyt40k%GdcJCHuwCTjN1j(sa<V^7I9!!&O^"_]dnDv\s$c[% p="GAB'9WlM*+#?@g~Yv}AxLPI|rv% *zJ2wiTP*@&L#-s(| y={A{>LL9i2g>'Zbp, B&MO)&~!BqO!~CTB8uNWhy#XA`DWqh|r*~:28^WrGy2MF8 XZu:6a]]Hw\yt8Go*"3e^{$X>{XeF"MgP7e>F2XKWJ#9,3qKC<xPJQOl8."=)~R!!/[e<)[ktTBB#\xh|v FQ-_ldk_SbSqyV!`#m4?,>\)|UvWL+55J&/=w@5^ZAOVL;'KZ8:a5,+|uOB/!l=zCEEsY |W>}~[fkv0s}FN3-]C:\P`vKY8<qupz26q2"~@3|_kS`]`@#q37zulbGQW5N3<x{wrT)qRznK^Tnh>rC"[:OQ8KZ"U0EFRoNj8TQ\JQ o f.pxYg%j73hnTXp5*U&C>T^ r2t-q?E<"L]Y6$Iw}39S2HDZiJ9#P+2=X8s_`E#([q!R8Ge";H@v"7<)hti7UR6H9CT76nj0Wc>X]-FrnE#>='[>(QpZ
Output
5

Validator 7 Validator
Input
<-k!ZTqLfy~[ovu-B\4!=oS^b><@v$LOFtmJ/D?|g@DFD7hL'(mQP9&xO5|.>=z,[$FWtv=F$'z!DJ/PB==jn.'6+ W$Q^+U42,i
Output
4

Test 8 Test
Input
12345
Output
0

Validator 8 Validator
Input
1231232
Output
0

Solution language

Solution

Stub generator input