diff --git a/Contests/Codechef/Reload the Code Gun/README.md b/Contests/Codechef/Reload the Code Gun/README.md new file mode 100644 index 0000000..80ff439 --- /dev/null +++ b/Contests/Codechef/Reload the Code Gun/README.md @@ -0,0 +1,18 @@ +# **Reload the Code Gun** + +This coding contest was based on algorithms, data structures and problem solving. + +**Duration**: 30 minutes +**Start time**: 26th December 2020, 18:30 hrs IST +**End time**: 26th December 2020, 19:00 hrs IST + +Here is the [link](https://www.codechef.com/RTCG2020?itm_campaign=contest_listing) to the contest. + +### **Problems:** +- Factor Count in a Number ([RTCG001](https://www.codechef.com/RTCG2020/problems/RTCG001)\) +- Burn Calories, no kidding! ([RTCG002](https://www.codechef.com/RTCG2020/problems/RTCG002)\) +- Hamming Distance ([RTCG003](https://www.codechef.com/RTCG2020/problems/RTCG003)\) +- Mias Essay Paper ([RTCG004](https://www.codechef.com/RTCG2020/problems/RTCG004)\) + + +### **Editorials:** N.A. diff --git a/Contests/Codechef/Reload the Code Gun/RTCG001.cpp b/Contests/Codechef/Reload the Code Gun/RTCG001.cpp new file mode 100644 index 0000000..c3adbb8 --- /dev/null +++ b/Contests/Codechef/Reload the Code Gun/RTCG001.cpp @@ -0,0 +1,29 @@ +#include +using namespace std; + +int main() { + #ifndef ONLINE_JUDGE + freopen("input.txt", "r", stdin); + freopen("output.txt", "w", stdout); + #endif + + ios_base::sync_with_stdio(false); + cin.tie(NULL); + + int T; + cin >> T; + while(T--) { + string N; + cin >> N; + + int num = stoi(N); + int ans = 0; + + for (int i=0; i +#include +using namespace std; + +int main() { + #ifndef ONLINE_JUDGE + freopen("input.txt", "r", stdin); + freopen("output.txt", "w", stdout); + #endif + + ios_base::sync_with_stdio(false); + cin.tie(NULL); + + map mp; + mp['D'] = 238; + mp['T'] = 244; + mp['M'] = 138; + mp['B'] = 279; + mp['C'] = 186; + + string S; + cin >> S; + + int cal = 0; + for (int i=0; i +using namespace std; + +int main() { + #ifndef ONLINE_JUDGE + freopen("input.txt", "r", stdin); + freopen("output.txt", "w", stdout); + #endif + + ios_base::sync_with_stdio(false); + cin.tie(NULL); + + string S, T; + cin >> S >> T; + + int ans = 0; + for (int i=0; i +using namespace std; + +int main() { + #ifndef ONLINE_JUDGE + freopen("input.txt", "r", stdin); + freopen("output.txt", "w", stdout); + #endif + + ios_base::sync_with_stdio(false); + cin.tie(NULL); + + int T; + cin >> T; + + while (T--) { + string S; + cin >> S; + + int ans = 0; + int n = S.size(); + for (int i=0; i