1080
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int i = 2;
while (!(n == 1))
{
if (n % i == 0)
{
n /= i;
cout << i << endl;
i = 2;
}
else
{
i++;
}
}
}
1081
#include <bits/stdc++.h>
#include <iomanip>
using namespace std;
int main()
{
int n;
cin >> n;
int a;
int b;
int c;
a = n / 3600;
b = n % 3600 / 60;
c = n % 3600 % 60;
cout << setw(2) << setfill('0') << a << ":"
<< setw(2) << b << ":"
<< setw(2) << c << endl;
}
1082
#include <bits/stdc++.h>
using namespace std;
int main()
{
cout << 1534;
}
1083
#include <iostream>
#include <cmath>
using namespace std;
bool judge(int n)
{
int num = 0;
int sum = 0;
for (int i = 1; n / i != 0; i *= 10)
{
if (n / i != 0)
{
num++;
}
}
for (int i = 1; i < num; i++)
{
sum += (n - n / (int)pow(10, i) * (int)pow(10, i)) / (int)pow(10, i - 1) * (int)pow(10, num - i);
}
sum += n / pow(10, num - 1);
if (sum == n)
{
return true;
}
else
{
return false;
}
}
int produce(int &n)
{
int num = 0;
int sum = 0;
for (int i = 1; n / i != 0; i *= 10)
{
if (n / i != 0)
{
num++;
}
}
for (int i = 1; i < num; i++)
{
sum += (n - n / (int)pow(10, i) * (int)pow(10, i)) / (int)pow(10, i - 1) * (int)pow(10, num - i);
}
sum += n / pow(10, num - 1);
n = n + sum;
return n;
}
int main()
{
int n;
cin >> n;
judge(n);
if (judge(n) == true)
{
cout << 0;
return 0;
}
else
{
int num = 0;
while (judge(n) == false)
{
produce(n);
num++;
}
cout << num;
return 0;
}
}
1084
#include <bits/stdc++.h>
#include <cmath>
using namespace std;
int sumOfFactors(int n) {
int sum = 0;
int sqrtN = sqrt(n);
for (int i = 2; i <= sqrtN; ++i) {
if (n % i == 0) {
sum += i;
if (i != n / i) {
sum += n / i;
}
}
}
return sum;
}
int main() {
int number;
cin >> number;
int result = sumOfFactors(number);
cout << result;
}
1085
#include <bits/stdc++.h>
#include <cmath>
using namespace std;
int main()
{
int a, b, c, d;
for (int i = 1000; i <= 9999; i++)
{
a = i / 1000;
b = i % 1000 / 100;
c = i % 1000 % 100 / 10;
d = i % 1000 % 100 % 10;
if (pow(10 * a + b + 10 * c + d, 2) == 1000 * a + 100 * b + 10 * c + d)
{
cout << i << endl;
}
}
}
1086
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int sum = 0;
for (int i = 1; i <= n; i++)
{
for (int j = i + 1; j <= n; j++)
{
if ((i + j) % 3 == 0 || (i + j) % 7 == 0)
{
sum++;
}
}
}
cout << sum;
}
1087
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int m, n, a, b, r;
cin >> m >> n;
if (m > n)
{
a = m;
b = n;
}
else
{
a = n;
b = m;
}
r = b;
while (r != 0)
{
r = a % b;
a = b;
b = r;
}
m /= a;
n /= a;
cout << a * m * n;
}
1088
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int m, n, a, b, r;
cin >> m >> n;
if (m > n)
{
a = m;
b = n;
}
else
{
a = n;
b = m;
}
r = b;
while (r != 0)
{
r = a % b;
a = b;
b = r;
}
cout << a;
}
1089
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a, b, c;
for (int i = 100; i <= 999; i++)
{
a = i / 100;
b = i % 100 / 10;
c = i % 100 % 10;
if (!(a == b || b == c||a==c))
{
if (b > a + c)
{
if (a + b != 3 && a + b != 5 && a + b != 7 && a + b != 11 && a + b != 13&& a + b != 17)
{
cout << i << endl;
}
}
}
}
}