Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
string str;
cin >> str;
vector<char> v;
for (int i = 1; i < n; i++)
{
if (str[i] == '1')
{
v.push_back(str[i]);
}
}
cout << v.size() << endl;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1016 Swap sort
- Contest
- Brain booster - 1
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2023-12-31 14:27:06
- Judged At
- 2024-11-11 03:46:16
- Judged By
- Score
- 20
- Total Time
- 6ms
- Peak Memory
- 744.0 KiB