eolymp
bolt
Try our new interface for solving problems
Problems

Sort by growth

published at 2/9/16, 11:27:47 pm

Выдает 0% - неверные решения, в чем причина?

int n;
cin >> n;

int *nums = new int[n];
for (register int i = 0; i < n; i++) cin >> nums[i];

unsigned a, b;
cin >> a; cin >> b;

int sumn = 0;
for (register int i = 0; i < n; i++)
    if (nums[i] >= a && nums[i] <= b) sumn++;

cout << sumn << '\n';
published at 5/17/18, 5:04:32 pm

while not Eof

умову перечитайте

published at 6/14/18, 4:19:19 pm

а сколько всего будет запросов?

published at 1/6/22, 12:07:41 pm

Чому задачу на Python неможливо зробити? Останній тест не проходить і пише ліміт часу при читанні!

published at 3/29/24, 3:45:28 pm

include<bits/stdc++.h>

using namespace std; int main(){ int n; int d=0; int f[10001]; while(cin >> n){ int a[n]; for(int i=0 ;i<n ;i++){ cin >> a[i]; } int b,c; cin >> b >> c; int k=0; for(int i=0 ;i<n ;i++){ if(a[i]<=c && a[i]>=b){ k++; } } f[d]=k; d++; }
for(int i=0 ;i<d ;i++){ cout << f[i] << endl; } }

published at 4/5/24, 12:28:04 am

include <iostream>

include <algorithm>

using namespace std; int main() { int n,a,b,s=0,i; while(cin>>n){ int x[n]; for(i=0;i<n;i++){ cin>>x[i]; } cin>>a>>b; for(i=0;i<n;i++){ if(x[i]>=a&&x[i]<=b){ s++; } } cout<<s<<endl; s=0; }

}