Beecrowd 1020 Solution in C, C++ & Python

Beecrowd 1020 Solution

URI – BEECROWD – BEE Online Judge || Age In Days – URI – BEE 1020 Solution in C,C++, Python Question Beecrowd 1020 Solution in C #include <stdio.h> int main() { int d,y,m; scanf(“%d”,&d); y=0; m=0; y=d/365; d=d%365; m=d/30; d=d%30; printf(“%d ano(s)\n%d mes(es)\n%d dia(s)\n”,y,m,d); return 0; } Bee1020 Solution in C++ #include <iostream> using namespace … Read more

Codeforces1807A. Plus or Minus Solution

Codeforces1807A. Plus or Minus(Div 4) Problem Question In this guide, we will explore the A Plus or Minus problem, a classic problem in computer programming that requires you to calculate the sum of a series of integers, with each integer being either positive or negative. We will walk you through the process of solving this … Read more

Codeforces 110A Nearly Lucky Number Solution in CPP

Codeforces 110A Nearly Lucky Number Solution

Question link: Codeforces 110A Nearly Lucky Number solution in CPP #include<bits/stdc++.h> using namespace std; int main() { string a; int c=0,z=0; cin>>a; for(int i=0;i<a.size();i++) { if(a[i]==’4’||a[i]==’7′)//Codeforces 110A Nearly Lucky Number solution in CPP c++; } if(c==4||c==7) cout<<“YES”<<endl; else cout<<“NO”<<endl; } Codeforces 734A.Anton and Danik solution in Cpp

Codeforces 977A Wrong Subtraction solution in CPP

Codeforces 977A Wrong Subtraction solution in CPP

Question link: Codeforces 977A Wrong Subtraction solution in CPP Wrong Subtraction #include<bits/stdc++.h> using namespace std; int main() { int n,k,r=0; cin>>n>>k; for(int i=1;i<=k;i++) { r=n%10; if(r==0) { n/=10; } else { n=n-1; } } cout<<n; } Code Explanation This is a C++ code that takes two integers n and k as input from the user, … Read more

Elephant Codeforces || Codeforces 617A Elephant solution in C++

Elephant Codeforces

Codeforces Elephant Question Elephant Codeforces solution in C++ An elephant decided to visit his friend. It turned out that the elephant’s house is located at point 0 and his friend’s house is located at point x(x > 0) of the coordinate line. In one step the elephant can move 1, 2, 3, 4 or 5 positions forward. Determine, what is the minimum number of steps he need to … Read more

Codeforces 546A Soldier and Bananas solution in C++

Codeforces 546A Soldier and Bananas solution in C++

Codeforces 546A. Soldier and Bananas Question A. Soldier and Bananas A soldier wants to buy w bananas in the shop. He has to pay k dollars for the first banana, 2k dollars for the second one and so on (in other words, he has to pay i·k dollars for the i-th banana). He has n dollars. How many dollars does he have to borrow from his … Read more

Stones On The Table Codeforces Solution || Codeforces 266A

Stones On The Table Codeforces Solution

Question Stones on the Table Codeforces Solution in C++ Problem:There are n stones on the table in a row, each of them can be red, green or blue. Count the minimum number of stones to take from the table so that any two neighboring stones had different colors. Stones in a row are considered neighboring … Read more

Codeforces Bear and Big Brother solution

Codeforces Problem 791/A. Bear and Big Brother solution with CPP

Codeforces Problem 791/A. Bear and Big Brother solution with CPP 100% Accepted Before seeking assistance, it is advisable to make an effort to solve the problem yourself. This can involve researching the problem online, reviewing relevant documentation, and attempting to apply your knowledge to find a solution. By trying to solve the problem first, you … Read more

Codeforces 236A Boy or Girl Solution || Codeforces Solution 236A

Boy or Girl Solution

Codeforces 236A Boy or Girl Solution in C/CPP Question: A. Boy or Girl Those days, many boys use beautiful girls’ photos as avatars in forums. So it is pretty hard to tell the gender of a user at the first glance. Last year, our hero went to a forum and had a nice chat with … Read more

Word capitalization codeforces solution

word capitalization codeforces solution

Word capitalization codeforces solution Codeforces 281A. Word Capitalization Solution in C #include <stdio.h> #include <string.h> int main() { char s[101]; scanf(“%s”, s); s[0] = toupper(s[0]); printf(“%s\n”, s); return 0; } Codeforces 281A. Word Capitalization Solution in CPP #include<iostream> #include<string>using namespace std; int main() { string s; cin>>s; s[0]=towupper(s[0]); cout<<s; } Codeforces 791/A. Bear and Big … Read more