7 kyu
Simple Fun #137: S2N
166 of 440myjinxin2015
Description:
Task
Your task is to find the sum for the range 0 ... m
for all powers from `0 ... n.
Example
For m = 2, n = 3
, the result should be 20
0^0+1^0+2^0 + 0^1+1^1+2^1 + 0^2+1^2+2^2 + 0^3+1^3+2^3 = 20
Note, that no output ever exceeds 2e9.
Input/Output
[input]
integer m
0 <= m <= 50000
[input]
integern
0 <= n <= 9
[output]
an integer(double in C#)
The sum value.
Puzzles
Similar Kata:
Stats:
Created | Feb 17, 2017 |
Published | Feb 17, 2017 |
Warriors Trained | 621 |
Total Skips | 2 |
Total Code Submissions | 811 |
Total Times Completed | 440 |
JavaScript Completions | 166 |
C# Completions | 57 |
Python Completions | 227 |
Ruby Completions | 35 |
Total Stars | 6 |
% of votes with a positive feedback rating | 91% of 141 |
Total "Very Satisfied" Votes | 119 |
Total "Somewhat Satisfied" Votes | 19 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 8 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 7 kyu |