09/11/09 16:37:19
>>659 待った?
int check(int n) {
int i, a[2], temp, c = 0;
while(n) {
temp = n % 10;
for(i = 0; i < c; i++)
if(a[i] == temp) break;
if(i == 2) return 0; // check NG
if(i == c) a[c++] = temp;
n /= 10;
}
if(c == 2) return 1; // check OK
return 0;
}