Accepted
Code
#include<bits/stdc++.h>
using namespace std;
void solve()
{
int n; cin>>n;
int ans=0;
for(int i=1;i<=n;i++)
{
if(i%2) ans++;
}
cout<<ans<<endl;
}
int main() {int t; cin>>t; while(t--) solve();}
Information
- Submit By
- Type
- Submission
- Problem
- P1041 Odd number
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2024-03-24 08:32:08
- Judged At
- 2024-03-24 08:32:08
- Judged By
- Score
- 100
- Total Time
- 2ms
- Peak Memory
- 540.0 KiB