long sum = 0;
for (Integer n = max; n > 0; n--) {
double foo = n / 17;
sum = sum + n ;
}
Language | Time Elapsed |
---|---|
Swift | 232ms |
Java | 518ms |
JavaScript | 606ms |
C | 1016ms |
Objective-C | 1062ms |
C++ | 1065ms |
Python | 7796ms |
Ruby | 8666ms |
Perl | 19673ms |