Yahoo India Web Search

Search results

  1. Lucky number is super lucky if it's decimal representation contains equal amount of digits 4 and 7. For example, numbers 47, 7744, 474477 are super lucky and 4, 744, 467 are not. One day Petya came across a positive integer n. Help him to find the least super lucky number which is not less than n.

  2. We all know that lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not. Unfortunately, not all numbers are lucky. Petya calls a number nearly lucky if the number of lucky digits in it is a lucky number.

  3. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not. Petya calls a number almost lucky if it could be evenly divided by some lucky number. Help him find out if the given number n is almost lucky.

  4. Mar 28, 2023 · Codeforces problem 110A requires us to determine whether a given number is lucky or not. A lucky number is defined as a number that contains only the digits 4 and 7, and the total count of these...

  5. Here is my all problems I'v solve. Contribute to AliOsm/CompetitiveProgramming development by creating an account on GitHub.

  6. For each number in the range, find the luckiness (the difference between the largest and smallest digits). Keep track of the maximum luckiness found so far and the corresponding starship number. Stop the iteration if the maximum luckiness is equal to 9, as this is the highest possible luckiness.

  7. Sep 10, 2020 · Codeforces Question Playlist : https://www.youtube.com/playlist?list=PLEL7R4Pm6EmDaWkjw7M2x9qFstCHoC6jCGraph Theory Playlist : https://www.youtube.com/playli...

  8. const int N = (1 << 11); set<ll>luckyNumbers; bool checkIfCountOf4and7(ll n) { ll cnt4 = 0, cnt7 = 0; while (n) { if (n % 10 == 4) { cnt4++; } else if (n % 10 == 7) { cnt7++; } n /= 10; } return cnt4 == cnt7; } void generate(ll n, ll i, ll num) { if (i == n) { if (checkIfCountOf4and7(num)) luckyNumbers.insert(num); return; } else { if ...

  9. Mar 29, 2023 · Problem link-https://codeforces.com/contest/1808/problem/ACode link-https://codeforces.com/contest/1808/submission/199646264

  10. Mar 16, 2023 · Codeforces 110A Nearly Lucky Number Solution in CPP Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.