You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
530 B
46 lines
530 B
///*
|
|
// * algorithm01.cpp
|
|
// *
|
|
// * Created on: May 21, 2024
|
|
// * Author: 28032
|
|
// */
|
|
//#include <iostream>
|
|
//#include <string>
|
|
//#include <algorithm>
|
|
//
|
|
//using namespace std;
|
|
//
|
|
//int main()
|
|
//{
|
|
// int k = 0,
|
|
// sum = 0;
|
|
// string n;
|
|
// cin>>k>>n;
|
|
//
|
|
// for(auto it : n)
|
|
// {
|
|
// sum+=(it-'0');
|
|
// }
|
|
// if(k <= sum)
|
|
// {
|
|
// cout<<0;
|
|
// }
|
|
// else
|
|
// {
|
|
// sort(n.begin(),n.end());
|
|
// int cnt = 0;
|
|
// while(k > sum)
|
|
// {
|
|
// sum+=(9-(n[cnt]-'0'));
|
|
// cnt++;
|
|
// }
|
|
// cout<<cnt;
|
|
// }
|
|
//
|
|
//
|
|
// return 0;
|
|
//}
|
|
//
|
|
//
|
|
//
|