Plus Minus

Read the lesson → understand the pattern → then code. Tutor works offline (built-in teacher); optional Cursor/Gemini keys upgrade chat quality.

Topic refresher: HackerRank Warmup

Classic warmup problems, taught slowly in Hindi, English, or Hinglish, then typed by you.

long long sum = 0;
for (int x : a) sum += x;
return sum;
HackerRank
5/12
EasyHackerRank Warmup

Plus Minus

Count positives, negatives, and zeros. Print each count divided by n, with 6 digits after the decimal.

Examples

Example 1

Input

6
-4 3 -9 0 4 1

Output

0.500000
0.333333
0.166667

Stuck? Take a nudge

C++17