Skip to content

Commit e418de7

Browse files
Merge pull request jitendrajat10099#7 from ddivyansh18/patch-2
Create CHEFSTON.cpp
2 parents ca6a93e + 4954242 commit e418de7

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

Codechef/CHEFSTON.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#PROBLEM : https://www.codechef.com/problems/CHEFSTON
2+
3+
#include <bits/stdc++.h>
4+
using namespace std;
5+
#define ll long long int
6+
7+
int main() {
8+
ll t;
9+
cin>>t;
10+
11+
while(t--)
12+
{
13+
ll n,k;
14+
cin>>n>>k;
15+
16+
ll a[n],b[n],i,ans=0;
17+
18+
for(i=0;i<n;i++)
19+
cin>>a[i];
20+
21+
for(i=0;i<n;i++)
22+
cin>>b[i];
23+
24+
for(i=0;i<n;i++)
25+
ans=max(ans,(k/a[i])*b[i]);
26+
27+
cout<<ans<<"\n";
28+
29+
30+
}
31+
}

0 commit comments

Comments
 (0)