CT26865

Wamika and the Frosted lanterns

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

It is audit day at the ink district of Scriptoria. Wamika spreads the lanterns records across the table and picks up a sharp pencil. Task: Read n integers and print how many are even. Input format: First line: n. Second line: n space-separated integers. Output format: Print the count of even values. Constraints: 1 <= n <= 828; -100 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 175 -81 -4 -32 -73 -38 -44 -74 -56 -25 -51 -16 -23 -45 -40 -51 -47 -70 -9 -34 -14 -17 -16 -29 -60 -28 -78 -55 -1 -23 -8 -7 -99 -79 -91 -45 -43 -20 -13 -90 -47 -45 -22 -100 -57 -84 8 4 -58 -3 -83 -70 -61 -28 -86 -86 -25 -90 -97 -34 -29 -86 -15 -16 8 -3 -91 -4 -53 -94 0 -2 -51 -73 -54 -61 -85 -19 -93 -77 -42 -48 -95 4 -12 4 6 -48 -90 -65 -50 -39 -38 -81 -80 -85 3 -60 -99 -64 -20 0 -25 -63 -66 -93 -72 -8 -7 -53 -38 -45 -54 -84 -35 -90 -52 -45 -6 -80 -77 10 -81 -73 3 -12 -90 -20 -62 -46 -9 -33 -70 -73 -52 -55 -16 -53 -58 -74 -29 -34 -87 -57 -41 -20 -91 -73 -75 -10 -96 -20 -83 -93 -39 -89 -83 -98 -100 -71 -92 -23 -54 -81 -7 -86 -99 -49 -56 -11 -21 -52 -84 -67 -46 10
Output: 89

Example 2:

Input: 157 3 -61 -13 -11 -38 -60 -17 -92 -99 -14 -29 -28 -12 -38 -88 8 -38 7 -53 -89 -83 -26 -44 -31 -87 -14 -74 -69 -20 -2 -100 -41 -42 -35 -9 -63 1 -76 -96 -73 -8 -52 -89 -82 -1 -31 -42 -2 -64 -97 4 -82 -57 -70 6 -58 -49 9 -40 -72 -55 -97 -73 -70 -100 -67 -34 -44 -7 -87 -12 -69 -93 -64 -2 -68 -34 9 -29 -99 -34 -56 -40 -54 -45 -81 -43 -72 1 -32 -35 5 -38 -20 -33 -98 -69 -87 -34 -12 -55 -68 -20 -54 -6 -63 -69 -18 -33 -45 -41 -4 3 3 0 -64 -76 -49 -6 -42 4 -62 1 -90 -12 -34 -54 -35 -23 -70 0 -73 6 -39 6 -47 -62 -84 -5 -61 -1 -34 -38 -9 -63 -6 -9 -75 -8 4 -6 -2 -60 -52 -12 -5 -25
Output: 86

Example 3:

Input: 685 -51 -2 -3 -28 -37 -98 -61 -32 -24 -79 -86 2 -49 -95 -72 -3 -47 -100 -67 -72 -98 -45 -85 -71 6 -75 -1 -92 -96 -40 -71 -33 -4 -32 -64 -79 -78 -44 -32 -51 -50 -73 -70 -94 -42 -79 -59 4 0 -77 -13 -61 -78 -82 -90 -27 -13 -86 -21 5 -83 -18 -11 4 -32 -87 -81 -81 -31 -68 -77 -70 -46 -21 -17 -36 -72 -85 -10 -91 0 -20 -95 -17 -90 -27 -90 -7 -35 -87 -14 -36 -53 -35 -60 -42 9 -31 -30 -53 -21 -4 -9 -34 -61 -59 -51 -17 -4 -23 -79 -98 -91 10 -70 -59 -52 -38 -46 -32 -94 -77 -97 -84 -74 -29 -21 -44 -20 -86 -98 -17 -94 -39 9 -63 -16 -51 -41 -24 -97 -72 -61 -56 -34 -52 -95 -75 -33 -27 9 2 -20 -96 -92 -86 -1 -58 -63 -80 -22 -62 -61 7 -12 -71 -41 8 -11 -96 -31 -24 -6 -71 -57 -67 -85 -31 -13 -48 -80 -51 -75 -50 -99 -100 -55 9 -52 -85 2 -43 -69 10 -64 -24 -37 -37 -10 -93 -72 -32 -47 -55 -74 -15 -47 -42 -52 -…
Output: 356

Constraints:

1 <= n <= 828; -100 <= a[i] <= 10; answers fit a signed 64-bit integer.

Loading...
Test Cases:No test cases
No test cases available.
Wamika and the Frosted lanterns - EASY Coding Problem | CodeTikki