Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO
3.36K subscribers
1.13K photos
3 videos
17 files
373 links
Main channel https://t.me/Coding_000
Contact Admin 👉 @ILOVEU_143 for booking your exam slots
Web- https://coding000.github.io/Projects/
💯% clearance in any placement exams
OffCampus -https://t.me/Offcampus_000
Discussion- https://t.me/exams_discussion
Download Telegram
Share our channel to ur frds . @Coding_000
show some love...and support ❤️😍
2🥰1
Amazon sde,IBM, wiley edge, Amcat or Any placements examm help available...

Contact @ILOVEU_143

Test Clearance Guaranteed

PLAGRISM FREE CODES

Don't miss this opportunity🥹

Team #Love143 @Coding_000
👍2
Delloite
Amazon Sde
AMcat
Wiley edge
or any exam help available 🔥💯

Book your slot

Contact here
@ILOVEU_143

100% clearance guarantee 🔥🔥
👍3
Amazon Sde Help available

contact @ILOVEU_143

Help available at low rates👍
👍3🔥1
Done with AMAZON exam Successfully through Laptop Access
👍3🔥1
How many of u writing INFOSYS today 10am & 3 pm 

Give heart..reactions fast ❤️
17
#include <bits/stdc++.h>
using namespace std;

int main() {
    string S;
    cin >> S;
    int n = S.length();
    int dp[n + 1];
    memset(dp, 0x3f, sizeof dp);
    dp[0] = 0;

    for (int i = 0; i < n; i++) {
        int digit = S[i] - '0';
        for (int j = max(0, i - 2); j < i; j++) {
            int sum = 0;
            for (int k = j; k <= i; k++) {
                sum += S[k] - '0';
            }
            if (sum % 3 == 0) {
                int cost = digit;
                for (int k = j; k <= i; k++) {
                    cost = min(cost, S[k] - '0');
//@Coding_000
                }
                dp[i + 1] = min(dp[i + 1], dp[j] + cost);
            }
        }
    }
    cout << dp[n] << endl;
    return 0;
}


C++


INFOSYS EXAM ANS 10AM

Share @Coding_000
👍1