Предмет: Информатика, автор: sumrak8460

помогите пожалуйста решить дам 20 баллов​

Приложения:

Ответы

Автор ответа: Аноним
0

/** libraries */

#include <iostream>

#include <cmath>

#include <vector>

#include <map>

#include <set>

#include <queue>

#include <stack>

#include <algorithm>

/** libraries */

using namespace std;

/** defines */

#define ll long long

#define ld long double

#define yes cout << "YES" << "\n"

#define no cout << "NO" << "\n"

/** defines */

vector<ll> a;

bool ok(ll num){

   return num % 6 == 0 && num % 10 == 4;

}

void solve(){

   ll sum = 0;

   for(auto i: a)

       if(ok(i))

           sum += i;

   cout << sum;

}

signed main() {

   ios_base::sync_with_stdio(false);

   cin.tie(nullptr);

   cout.tie(nullptr);

   while(true){

       ll x;

       cin >> x;

       if(x == 0)

           break;

       a.push_back(x);

   }

   solve();

}

Похожие вопросы
Предмет: Физика, автор: Ivan2001425