#include<iostream>
using namespace std;
string s;
int a[1010], c[1010];
long long b = 13;
long long r;
int main() {
cin >> s;
for (int i = 0; i < s.length(); i++)
{
a[i + 1] = s[i] - '0';
}
int lena = s.length();
for (int i = 1; i <= lena; i++) {
c[i] = (r * 10 + a[i]) / b;
r = (r * 10 + a[i]) % b;
}
int lenc = 1;
while (c[lenc] == 0 && lenc < lena) lenc++;
for (int i = lenc; i <=lena; i++)
cout << c[i];
cout << endl << r << endl;
return 0;
}
高精度除法
最新推荐文章于 2024-08-30 16:00:44 发布