#include <iostream>
#include <cmath>
#define pi acos(-1.0)
using namespace std;
int main() {
int n, casei = 0;
cin >> n;
while (n -- ) {
float a, b;
cin >> a >> b;
printf("Property %d: This property will begin eroding in year ", ++ casei);
float r = sqrt(a * a + b * b);
cout << (int)(pi * r * r / 2 / 50) + 1 << '.' << endl;
}
printf("END OF OUTPUT.");
return 0;
}
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
const int N = 1010;
struct node {
double l;
double r;
} a[N];
bool cmp(node a, node b) {
return a.l <= b.l;
}
int main() {
int n, d, casei = 0;
while (cin >> n >> d && n && d) {
bool flag = true;
for (int i = 0; i < n; i ++ ) {
double x, y;
cin >> x >> y;
if (y > d)
flag = false;
double z = sqrt(d * d - y * y);
a[i].l = x - z;
a[i].r = x + z;
}
if (!flag)
printf("Case %d: -1\n", ++ casei);
else {
sort(a, a + n, cmp);
int res = 1;
double R = a[0].r;
for (int i = 1; i < n; i ++ ) {
if (a[i].l > R ) {
res ++ ;
R = a[i].r;
} else if (a[i].r <= R)
R = a[i].r;
}
printf("Case %d: %d\n", ++ casei, res);
}
}
return 0;
}
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int main() {
int n, a[4];
while (cin >> n && n != -1) {
printf("N=%d:\n", n);
if (n % 1111 == 0 || n > 9999 || n < 1000) {
printf("No!!\n");
continue;
}
int cnt = 0;
while (1) {
int pos = 0;
while (n) {
a[pos ++ ] = n % 10;
n /= 10;
}
sort(a, a + pos);
int T = 0, t = 0;
for (int i = 0; i < pos; i ++ ) {
T = T * 10 + a[pos - 1 - i];
t = t * 10 + a[i];
}
n = T - t;
cnt ++ ;
printf("%d-%d=%d\n", T, t, n);
if (n == 0 || n == 6174) {
printf("Ok!! %d times\n", cnt);
break;
}
}
}
return 0;
}
#include <iostream>
using namespace std;
int main() {
char n;
int s, cnt = 0;
while ((n = getchar()) != '#') {
cnt = 1;
s = 1 * (n - 64);
while ((n = getchar()) != '\n') {
if (n == ' ') {
cnt ++ ;
s = s + 0;
} else {
cnt ++ ;
s = s + cnt * (n - 64);
}
}
cout << s << endl;
}
return 0;
}
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
#define pi acos(-1.0)
const int N = 110;
struct node {
int l;
int r;
} a[N];
bool cmp(node a, node b) {
if (a.r < b.r)
return true;
else if (a.r == b.r && a.l > b.l)
return true;
return false;
}
int main() {
int n;
while (cin >> n && n) {
for (int i = 0; i < n; i ++ )
cin >> a[i].l >> a[i].r;
sort(a, a + n, cmp);
int res = 1;
for (int i = 1; i < n; i ++ ) {
if (a[i].l >= a[i - 1].r)
res ++ ;
else
a[i].r = min(a[i].r, a[i - 1].r);
}
cout << res << endl;
}
return 0;
}