# A题

```#include <iostream>

using namespace std;

int main()
{
string s;
cin >> s;
int cnt1 = 0, cnt2 = 0;
for(int i = 0; i < 4; i++)
{
if('+' == s[i])
{
cnt1++;
}
else
{
cnt2++;
}
}

cout << cnt1 - cnt2;
return 0;
}```

# B题

```#include <iostream>

using namespace std;

int main()
{
int num;
cin >> num;
int temp = num;

int n = 0;
while(temp)
{
n += temp % 10;
temp /= 10;
}

if(0 == num % n)
{
cout << "Yes";
}
else
{
cout << "No";
}
}```

# C题

```#include <iostream>

using namespace std;

int main()
{
int n, k;
cin >> n >> k;
int a[n + 1];
for(int i = 1; i <= n; i++)
{
cin >> a[i];
}

int ans = (n - 1) / (k - 1);
if(0 != (n - 1) % (k - 1))
{
ans += 1;
}

cout << ans;

return 0;
}```

# D题

```#include<iostream>
using namespace std;

typedef long long LL;

double s(LL n)
{
LL x = n;
LL y = 0;
while (x)
{
y += x % 10;
x /= 10;
}

return (double)n / y;
}

int main()
{
LL K;
LL n = 1;
LL x = 1;

cin >> K;

for (int i = 0; i < K; i++)
{
cout << n << endl;
if (s(n + x) > s(n + x * 10))
{
x *= 10;
}

n += x;
}

return 0;
}```

TopCoder & Codeforces & AtCoder交流QQ群：648202993