Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul255 authored Nov 14, 2018
1 parent 02e6a2e commit c183146
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
12 changes: 12 additions & 0 deletions 460A.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <iostream>

using namespace std;

int main()
{
int n,m,i,count;
cin>>n>>m;
i=(n-1)/(m-1);
cout<<n+i;
return 0;
}
24 changes: 24 additions & 0 deletions 677A.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <iostream>

using namespace std;

int main()
{
int n,l,a[10000],i,count=0,count1=0,value=0;
cin>>n>>l;
for(i=0;i<n;i++)
{
cin>>a[i];
if(a[i]>l)
{
count=count+2;
}
if(a[i]<=l)
{
count1=count1+1;
}
}
value=value+count+count1;
cout<<value;
return 0;
}

0 comments on commit c183146

Please sign in to comment.