Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Pahoittelemme, ettÀ jotain meni pieleen. MitÀ tapahtui?

book
Modified Sum Calculation

Given a list of integers and a threshold integer, return a sum of numbers, where each number contributes 2 if it exceeds or equals the threshold and 1 otherwise.

Example 1

Input:

[2, 8, 25, 18, 99, 11, 17, 16], 17

Output:

12
main.cpp

main.cpp

cpp

Kysy tekoÀlyÀ

expand

Kysy tekoÀlyÀ

ChatGPT

Kysy mitÀ tahansa tai kokeile jotakin ehdotetuista kysymyksistÀ aloittaaksesi keskustelumme

some-alt