B. Digits||Educational Codeforces Round 173 (Rated for Div. 2)||c++ solution 100% test case pass

Поделиться
HTML-код
  • Опубликовано: 2 янв 2025

Комментарии • 11

  • @Code-Review-c91
    @Code-Review-c91  9 дней назад

    I didn't have time so there is a code in the telegram group

  • @Code-Review-c91
    @Code-Review-c91  9 дней назад

    Subscribe and like

    • @ITWorld-tutorial
      @ITWorld-tutorial 9 дней назад

      please give c i did all thinks that you said

  • @worldsvideos1234
    @worldsvideos1234 9 дней назад +1

    Please write the code in description

  • @Code-Review-c91
    @Code-Review-c91  9 дней назад

    Seen teligram group c

  • @worldsvideos1234
    @worldsvideos1234 9 дней назад +1

    Hii

  • @worldsvideos1234
    @worldsvideos1234 9 дней назад

    Give the code in description

  • @Code-Review-c91
    @Code-Review-c91  9 дней назад

    #include
    using namespace std;
    typedef long long ll;
    vector determineDigits(ll n, ll d) {
    vector ans;
    // Always include 1
    ans.push_back(1);
    // Include 3 if n >= 3 or d is divisible by 3
    if (n >= 3 || d % 3 == 0) {
    ans.push_back(3);
    }
    // Include 5 if d is 5
    if (d == 5) {
    ans.push_back(5);
    }
    // Include 7 if n >= 3 or (n == 2 and d == 7)
    if (n >= 3 || (n == 2 && d == 7)) {
    ans.push_back(7);
    }
    // Include 9 if special condition or n >= 6
    if (n >= 6) {
    ans.push_back(9);
    }
    else {
    ll factorial = 1;
    int i = 2;
    while (i > t;
    while (t--) {
    ll n, d;
    cin >> n >> d;
    vector ans = determineDigits(n, d);
    for (int digit : ans) {
    cout

  • @ITWorld-tutorial
    @ITWorld-tutorial 9 дней назад

    please c
    pleaseeeeeeeeeeeeeeeeeeeee

  • @worldsvideos1234
    @worldsvideos1234 9 дней назад

    Please