| 200 | 300 | 400 | 600 | 700 | 800 | 1000 | 1100 | 1200 | 1300 | 1400 | 1500 | 1800 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 2 | 1 | |||||||||||
| 10 | 1 | 1 | |||||||||||
| 20 | 1 | 1 | |||||||||||
| 30 | 1 | ||||||||||||
| 40 | 1 | 1 | 1 | ||||||||||
| 50 | 1 | 2 | 1 | ||||||||||
| 60 | 1 | ||||||||||||
| 70 | 1 | ||||||||||||
| 80 | 1 | 1 | |||||||||||
| 90 | 1 | 1 | 1 | 1 | |||||||||
| Totals | 1 | 1 | 3 | 2 | 5 | 1 | 2 | 1 | 3 | 1 | 1 | 1 | 1 |
Statistics derived from all files ending in .cc, .cpp,
.CC, .C, and .h.
| 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | |
|---|---|---|---|---|---|---|---|---|
| 0 | ||||||||
| 10 | 1 | |||||||
| 20 | 1 | |||||||
| 30 | 1 | 2 | ||||||
| 40 | 1 | 2 | 1 | |||||
| 50 | 2 | 1 | ||||||
| 60 | 1 | 1 | ||||||
| 70 | 2 | 1 | ||||||
| 80 | 1 | 3 | ||||||
| 90 | 1 | 1 | ||||||
| Totals | 4 | 3 | 8 | 1 | 2 | 2 | 2 | 1 |
Statistics derived from all files ending in .cc, .cpp,
.CC, .C, and .h.
| total | pages per procedure | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| procs | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 3 | 1 | 1 | 1 | |||||||||||||||||
| 3 | 1 | 2 | ||||||||||||||||||
| 3 | 3 | |||||||||||||||||||
| 3 | 1 | 1 | 1 | |||||||||||||||||
| 8 | 5 | 1 | 1 | 1 | ||||||||||||||||
| 9 | 5 | 2 | 1 | 1 | ||||||||||||||||
| 12 | 5 | 1 | 2 | 1 | 1 | 1 | 1 | |||||||||||||
| 13 | 5 | 1 | 1 | 3 | 1 | 1 | 1 | |||||||||||||
| 13 | 6 | 5 | 2 | |||||||||||||||||
| 13 | 9 | 3 | 1 | |||||||||||||||||
| 16 | 9 | 3 | 4 | |||||||||||||||||
| 18 | 15 | 3 | ||||||||||||||||||
| 18 | 18 | |||||||||||||||||||
| 20 | 16 | 2 | 2 | |||||||||||||||||
| 23 | 17 | 3 | 1 | 1 | 1 | |||||||||||||||
| 27 | 18 | 7 | 1 | 1 | ||||||||||||||||
| 32 | 26 | 3 | 2 | 1 | ||||||||||||||||
| 52 | 40 | 8 | 1 | 1 | 1 | 1 | ||||||||||||||
Statistics derived from all files ending in .cc, .cpp,
.CC, .C, and .h.
| File Counts | Count | Average Lines/File | Avg Semicolons per File |
|---|---|---|---|
| 1 | 5 | 448 | 226 |
| 2 | 1 | 649 | 269 |
| 3 | 9 | 350 | 154 |
| 4 | 3 | 188 | 80 |
| 5 | 3 | 242 | 110 |
| 6 | 1 | 120 | 54 |
| 7 | 0 | ||
| 8 | 1 | 181 | 99 |
Statistics derived from all files ending in .cc, .cpp,
.CC, .C, and .h.
int main()
while (input(cin, problem))
solve(problem)
print(cout, problem)
solve() to print()?
int main()
long_division p
while (p.input(cin))
p.solve())
p.output(cout)
int main()
while (input(cin, problem))
solve(problem)
print(cout, problem)
struct solution {
bignum numerator, denominator, quotient
}
int main()
while (input(cin, problem))
solution s = solve(problem)
print(cout, s)
for (unsigned i = (quo[0] == '-' ? 2 : 1); i < quo.length(); i++) {
rmd_pos++;
if (quo[i] != '0') {
const string & n = *di++;
print(os, rmd_pos, n);
print(os, rmd_pos, *di++);
print(os, rmd_pos, string(n.length(), '-'));
}
}
typedef vectordivision; typedef division::iterator d_iter; typedef division::const_iterator d_citer; int main() { string den; while (cin >> den) { string num; if (!(cin >> num)) { cerr << "Input error.\n"; return EXIT_FAILURE; } cout << "\n"; const division d = long_divide(num, den); output(cout, d); } }
for (str_itr i = num.begin(); i != num.end(); i++)
n = n*10 + (*i - '0');
q = q*10;
const bignum m = n/d;
if (m != 0)
if (div.size() != 3)
div.push_back(n.str());
div.push_back((m*d).str());
n = n - m*d;
q = q + m;
const bool positive = ((den[0] == '-') && (num[0] == '-')) || ((den[0] != '-') && (num[0] != '-')); str_abs(den); str_abs(num); str_pair n_parts = split(num); str_pair d_parts = split(den); const unsigned shift = d_parts.second.length(); right_shift(n_parts, shift); right_shift(d_parts, shift); division d = ld(n_parts.first, d_parts.first); d[0] = string(positive ? "" : "-") + d[0]; d[1] = den; d[2] = num; str_pair rem = make_pair(*(d.rbegin()), n_parts.second); left_shift(rem, shift); *(d.rbegin()) = unsplit(rem); return d;
This page last modified on 30 November 2001.