K
Khách

Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.

17 tháng 8 2023

Xin link ạ

14 tháng 8 2023

bấm chữ x nha bạn

 

14 tháng 8 2023

Là chữ x nha 

 

Vd 3x3

 

15 tháng 8 2023

#include <iostream>
#include <regex>
#include <stack>
#include <vector>
using namespace std;
void delNum(string n) {
    int k = n.length() - 5;
    stack<int> digits;
    for (long i = 0; i < n.length(); i++) {
        int tmp =  n[i] - 0;
        if (digits.empty()) digits.push(tmp);
        else {
            while (!digits.empty() && tmp > digits.top() && k > 0) {
                digits.pop();
                k--;
            }
            digits.push(tmp);
        }
    }
    while (k > 0 && !digits.empty()) {
        digits.pop();
        k--;
    }
    vector<char> chars;
    while (!digits.empty()) {
        int tmp = digits.top();
        digits.pop();
        chars.push_back(tmp);
    }
    for (long i = chars.size() - 1; i >= 0; i--) cout << chars[i];
}
int main() {
    string s;
    cin >> s;
    string n = regex_replace(s, regex(R"([\D])"), "");
    delNum(n);
    return 0;
}

14 tháng 8 2023

 

...

Vẫn còn nữa nhé. Bạn truy cập trang web này: https://hoc24.vn/danh-hieu

22 tháng 8 2023

thanks nha

yeu

13 tháng 8 2023

#include <iostream>

#include <unordered_map>

#include <vector>

using namespace std;

int countDivisors(int num) {

    int count = 0;

    for (int i = 1; i <= num; i++) {

        if (num % i == 0) {

            count++;

        }

    }

    return count;

}

int main() {

    int N;

    cin >> N;

    unordered_map<int, int> classMap;

    for (int i = 0; i < N; i++) {

        int num;

        cin >> num;

        int divisors = countDivisors(num);

        classMap[divisors]++;

    }

    cout << classMap.size() << endl;

    for (auto it = classMap.begin(); it != classMap.end(); it++) {

        cout << it->first << " " << it->second << endl;

    }

    return 0;

}

13 tháng 8 2023

def count_minimum_stones(n, colors):

     count = 0

     for i in range(n-1):

          if colors[i] == colors[i+1]:

               count += 1

     return count

n = int(input())

colors = input().split()

result = count_minimum_stones(n, colors)

print(result)

14 tháng 8 2023

Bạn lm dưới dạng C++ đc ko ạ