Chnaged folder names

This commit is contained in:
ShazidMahsrafi 2023-06-07 22:31:31 +06:00
parent c5af3b3a99
commit 4aaa7db602
18 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,22 @@
#include <bits/stdc++.h>
using namespace std;
int main()
{
int i, t, count;
cin >> t;
while (t--)
{
string s,c= "codeforces";
cin >> s;
count = 0;
for (i = 0; i < 10; i++)
{
if (s[i] != c[i])
{
count++;
}
}
cout << count << endl;
}
}

View File

@ -0,0 +1,28 @@
#include <bits/stdc++.h>
using namespace std;
int main()
{
int i, n, t, count, ans;
cin >> t;
while (t--)
{
cin >> n;
int a[n];
ans = 0;
count = 0;
for (i = 0; i < n; i++)
{
cin >> a[i];
if (a[i] == 0)
{
count++;
}
else
{
ans= max(count,ans);
count= 0;
}
}
cout << max(count,ans) << endl;
}
}

View File

@ -0,0 +1,15 @@
#include<bits/stdc++.h>
using namespace std;
int main()
{
int k,n,w;
cin>>k>>n>>w;
int i,money=0;
for(i=1;i<=w;i++)
{
money=money+i*k;
}
if(money>n) cout<<money-n<<endl;
else cout<<0<<endl;
}