Accepted
Code
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define all(v) v.begin(),v.end()
const int mod = 1e9 + 7;
void solve(){
}
int32_t main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t = 1;
cin >> t;
vector<int> v(1e5+1,0);
for (int i=1; i<=1e5; i+=2){
v[i]++;
}
for (int i=1; i<=1e5; i++){
v[i] = v[i] + v[i-1];
}
while(t--){
int n;
cin >> n;
cout << v[n] << endl;
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1041 Odd number
- Contest
- TLE_Headquarters - round #1
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2024-03-27 16:19:28
- Judged At
- 2024-11-11 03:39:04
- Judged By
- Score
- 100
- Total Time
- 2ms
- Peak Memory
- 1.316 MiB