Bağban
in all value of N the answers is same for this problem-2. How we could write code for this?
странно но как я понял количество дней будет просто n-1 хотя ответ такой не принимает.
Следует понимать, что всего дней- N
Нічого не поняв, але зробив задачу з першого разу
У фразі "загалом під кожне з дерев" головне слово - "загалом". Тобто сумарно під всі дерева.
А у реченні "Садівник посадив за день N дерев і повинен був вилити під кожен саджанець по відру води." Мається на увазі в цей день, а не за всю історію поливання.
What is mƏqsəd?
негри имба
Я люблю подільський науково-технічний ліцей для обдарованої молоді
Зварич Назар 10-Фх вчу c++
N can be 1. This mean - gardener never pour tree because 1/1 >= 1/2. Which answer is right in this case? 1 day, 2 days or 100500 days?
include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() { iosbase::syncwith_stdio(0); cin.tie(0); double n, cem = 0, cnt = 0; cin >> n; for(int i=0; i<n; i++){ cem += 1/(n-i); if(cem > 0.5){ break; } cnt++; } cout << n-cnt;
}
As far as i know, there are not a lot of great online casinos. I've been playing mr bet casino login online casino provider for a long time and can't say anything bad about it.Here you can find everything you want from https://mrbetcanada.com/ the table games to the most popular slots worldwide.
include <iostream>
using namespace std;
int main() { int n,t; cin>>n; double sum=0; for(int i=n; i>=1; i--) { double p=i; double k=1/p; sum+=k; t=i; if(sum>0.5) break; } cout<<t; }
include <iostream>
using namespace std;
int main() { int n,t; cin>>n; double sum=0; for(int i=n; i>=1; i--) { double p=i; double k=1/p; sum+=k; t=i; if(sum>0.5) break; } cout<<t; }