Aktywne Wpisy
mrocznegacie +292
Dobra, z racji tego, że dziś zarobiłem trochę przez wifi i telefon to robię rozdajo.
100zł dla pięknego kawalera (lub kawalerki) którego wylosuję jutro do 12
Wysyłka do paczkomatu (nadawca, sam Michał B).
Standardowo, losowanko z plusów+komć, zielonki out.
100zł dla pięknego kawalera (lub kawalerki) którego wylosuję jutro do 12
Wysyłka do paczkomatu (nadawca, sam Michał B).
Standardowo, losowanko z plusów+komć, zielonki out.
mickpl +210
Rozwala mnie ten argument, że państwo nie może budować, bo będzie korupcja.
Oczywiście, że będzie. Korupcja, kolesiostwo, przekręty duże i małe. Ale od tego mamy cały aparat i służby, aby to nadzorować.
Budowa mieszkań przez państwo jest JEDYNĄ sprawdzoną metodą, aby obniżyć ich ceny i zwiększyć dostępność. Trudną, kosztowną, korupcjogenną i długotrwałą - ale działającą. NIC innego nie działa, nie znajdziecie żadnego poważnego artykułu naukowego potwierdzającego skuteczność innej metody. Znajdziecie za to masę potwierdzających, że dopłaty do kredytów powodują jedynie wzrost cen i tyle.
Mało
Oczywiście, że będzie. Korupcja, kolesiostwo, przekręty duże i małe. Ale od tego mamy cały aparat i służby, aby to nadzorować.
Budowa mieszkań przez państwo jest JEDYNĄ sprawdzoną metodą, aby obniżyć ich ceny i zwiększyć dostępność. Trudną, kosztowną, korupcjogenną i długotrwałą - ale działającą. NIC innego nie działa, nie znajdziecie żadnego poważnego artykułu naukowego potwierdzającego skuteczność innej metody. Znajdziecie za to masę potwierdzających, że dopłaty do kredytów powodują jedynie wzrost cen i tyle.
Mało
Proszę o podpowiedź dlaczego mój kod nie działa.
KOD:
function save(sizes, hd) {
let space = 0
let arr = []
for (let i = 0; ihd){
break
} else {
space =+sizes[i]
arr.push(sizes[i])
}
Zadanie:
Your task is to determine how many files of the copy queue you will be able to save into your Hard Disk Drive. The files must be saved in the order they appear in the queue.
INPUT:
Array of file sizes (0 <= s <= 100)
Capacity of the HD (0 <= c <= 500)
OUTPUT:
Number of files that can be fully saved in the HD.
EXAMPLES:
save([4,4,4,3,3], 12) -> 3
# 4+4+4 <= 12, but 4+4+4+3 > 12
save([4,4,4,3,3], 11) -> 2
# 4+4 <= 11, but 4+4+4 > 11
Do not expect any negative or invalid inputs.
}return arr.length
}
Zrzut ekranu testów:
#programowanie #javascript #codewars
Mój kod:
function save(sizes, hd) {
let space = 0
let arr = []
for (let i = 0; ihd){
function save(sizes, hd) {
let space = 0
let arr = []
for (let i = 0; i <