Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
Anas-Hamo23 committed Aug 28, 2023
1 parent b467704 commit 0c740ca
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ICPC Assiut University Community/Contest #1/A - Winter Sale.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <bits/stdc++.h>
using namespace std;
#define ll_a long long
#define ll_u unsigned long long
#define sort_Vector(v) sort(v.begin(),v.end())
#define sort_Array(a,n) sort(a,a+n)
#define fast ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);

int main() {
fast
double x,p;cin>>x>>p;
int y=100-x;
double z=(p*100)/y;
cout<<fixed<<setprecision(2)<<z;
return 0;
}
22 changes: 22 additions & 0 deletions ICPC Assiut University Community/Contest #1/B - Memo and Momo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include <bits/stdc++.h>
using namespace std;
#define ll_a long long
#define ll_u unsigned long long
#define sort_Vector(v) sort(v.begin(),v.end())
#define sort_Array(a,n) sort(a,a+n)
#define fast ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);

int main() {
fast
ll_u a,b,k;cin>>a>>b>>k;
if(a%k==0&&b%k==0){
cout<<"Both";
}else if(a%k==0&&b%k!=0){
cout<<"Memo";
}else if(b%k==0&&a%k!=0){
cout<<"Momo";
}else{
cout<<"No One";
}
return 0;
}
15 changes: 15 additions & 0 deletions ICPC Assiut University Community/Contest #1/C - Next Alphabet.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <bits/stdc++.h>
using namespace std;
#define ll_a long long
#define ll_u unsigned long long
#define sort_Vector(v) sort(v.begin(),v.end())
#define sort_Array(a,n) sort(a,a+n)
#define fast ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);

int main() {
fast
char a;cin>>a;
if(a=='z')cout<<"a";
else cout<<char(a+1);
return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include <bits/stdc++.h>
using namespace std;
#define ll_a long long
#define ll_u unsigned long long
#define sort_Vector(v) sort(v.begin(),v.end())
#define sort_Array(a,n) sort(a,a+n)
#define fast ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);

int main() {
fast
ll_u a,b,c,d;cin>>a>>b>>c>>d;
if(a+b*c==d){
cout<<"YES";
}else if(a*b+c==d){
cout<<"YES";
}else if(a+b-c==d){
cout<<"YES";
}else if(a-b+c==d){
cout<<"YES";
}else if(a-b*c==d){
cout<<"YES";
}else if(a*b-c==d){
cout<<"YES";
}else cout<<"NO";
return 0;
}

0 comments on commit 0c740ca

Please sign in to comment.