Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Author - Arten
- */
- #include <bits/stdc++.h>
- using namespace std;
- #define endl "\n"
- #define ll long long
- #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
- int main(){
- IOS;
- int t;
- cin >> t;
- while(t--){
- ll n, count = 0;
- cin >>n;
- for(ll i = 1; i <= n; i = i + 2){
- if(i % 2 == 0 || i % 3 == 0 || i % 5 == 0 || i % 7 == 0 || i % 11 == 0 || i % 13 == 0 || i % 17 == 0 || i % 19 == 0)
- count++;
- }
- cout << count+n/2 << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment