Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
  int kazu = 0;
  int jyougenn = 0;
  cin >> kazu >> jyougenn;
  vector<int> a(kazu);
  vector<int> ak(kazu);
  int koubai = 1;
  for(int i = 0;i <= kazu - 1;i++){
    cin >> a[i];
    ak[i] = a[i]
  }
  int count = 0;
  vector<int> wareruka(kazu);
  for(int i = 0;i <= kasu - 1;i++){
    wareruka[i] = 0;
  }
  for(int i = 1;i <= pos(max[a],0.5);i++){
    for(int j = 0;j <= kazu - 1;j++){
      if(ak[j] % i == 0){
        wareruka[j] = 1;
        count++;
      }
    }
    if(count >= 2){
      for(int k = 0;k <= kazu - 1;k++){
        if(wareruka[k] == 1){
          ak[k] /= i;
        }
      }
      koubai *= i;
    }
  }
  int saisyoukoubai = 1;
  saisyoukoubai *= koubai
  for(int i = 0;i <= kazu - 1;i++){
   	saisyoukoubai *= ak[i];
  }
  //ここから
  vector<double> p(kazu);
  for(int i = 0;i <= kazu - 1;i++){
    p[i] = 1.5;
  }
  int onajika = 0;
  while(1){
    onajika = 0;
    for(int i = 0;i <= kazu - 1;i++){
      if(a[0] != a[i]){
        onajika = 1;
      } 
    }
    if(onajika == 0 || min(a) >= jyougenn){
      break;
    }
    else{
      for(int i = 0;i <= kazu - 1;i++){
          if(min(a) == a[i]){
            a[i] *= p[i];
            p[i] += 1;
          }
      }
    }
  }
  int kotae = 0;
  if(onajika == 0){
   	kotae = (jyougenn - a[0]) / saisyoukoubai + 1;
  }
  else{
    kotae = 0;
  }
  cout << kotae << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: expected ';' before '}' token
   14 |     ak[i] = a[i]
      |                 ^
      |                 ;
   15 |   }
      |   ~              
a.cc:18:22: error: 'kasu' was not declared in this scope; did you mean 'kazu'?
   18 |   for(int i = 0;i <= kasu - 1;i++){
      |                      ^~~~
      |                      kazu
a.cc:21:29: error: no match for 'operator[]' (operand types are '<unresolved overloaded function type>' and 'std::vector<int>')
   21 |   for(int i = 1;i <= pos(max[a],0.5);i++){
      |                             ^
a.cc:21:22: error: 'pos' was not declared in this scope
   21 |   for(int i = 1;i <= pos(max[a],0.5);i++){
      |                      ^~~
a.cc:38:26: error: expected ';' before 'for'
   38 |   saisyoukoubai *= koubai
      |                          ^
      |                          ;
   39 |   for(int i = 0;i <= kazu - 1;i++){
      |   ~~~                     
a.cc:39:17: error: 'i' was not declared in this scope
   39 |   for(int i = 0;i <= kazu - 1;i++){
      |                 ^
a.cc:55:27: error: no matching function for call to 'min(std::vector<int>&)'
   55 |     if(onajika == 0 || min(a) >= jyougenn){
      |                        ~~~^~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   template argument deduction/substitution failed:
a.cc:55:27: note:   'std::vector<int>' is not derived from 'std::initializer_list<_Tp>'
   55 |     if(onajika == 0 || min(a) >= jyougenn){
      |                        ~~~^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   candidate expects 2 arguments, 1 provided
a.cc:60:17: error: no matching function for call to 'min(std::vector<int>&)'
   60 |           if(min(a) == a[i]){
      |              ~~~^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   template argument deduction/substitution failed:
a.cc:60:17: note:   'std::vector<int>' is not derived from 'std::initializer_list<_Tp>'
   60 |           if(min(a) == a[i]){
      |              ~~~^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   candidate expects 2 arguments, 1 provided