Загрузка данных




#include <iostream>
#include <string>
#include <vector>
using namespace std;

class BigInt {
private:
    vector<int> digits;
public:
    BigInt() {
        digits.push_back(0);
    }
    BigInt(string n) {
        if (n.empty()) {
            digits.push_back(0);
            return;
        }
        for (int i = n.length() - 1; i >= 0; i--) {
            digits.push_back(n[i] - '0');}}
    void print() const {
        for (int i = digits.size() - 1; i >= 0; i--) {
            cout << digits[i];}
        cout << endl;}
    void clear(){
        digits.clear();
        digits.push_back(0);}
};
int main()
{
    BigInt num("432958235724238528354273482348234273482347284265464567454575475467557567567567577576647248278426475623543485634856384");
    num.print();
    num.clear();
    return 0;
}