### C(11) gcc -std=c11
```{.cpp}
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
// 문자->정수
inline static int ctoi(char c) { return c - '0'; }
// 0~9까지 숫자가 한번씩만 사용했는지
bool is_duplicate(char *str);
int main(void)
{
char temp[80];
while (scanf("%s", temp) == 1)
printf("%s\n", is_duplicate(temp) ? "true" : "false");
return 0;
}
bool is_palindromduplicate(char *str)
{
if (strlen(str) != 10)
return false;
int number[10] = {[0] = 0};
while (*str)
++number[ctoi(*str++)];
for (int i=0; i<10; ++i)
if (number[i] != 1)
return false;
return true;
}
```
### C(11) gcc -std=c11
```{.cpp}
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
// 문자->정수
inline static int ctoi(char c) { return c - '0'; }
// 0~9까지 숫자가 한번씩만 사용했는지
bool is_duplicate(char *str);
int main(void)
{
char temp[80];
while (scanf("%s", temp) == 1)
printf("%s\n", is_duplicate(temp) ? "true" : "false");
return 0;
}
bool is_palindromduplicate(char *str)
{
if (strlen(str) != 10)
return false;
int number[10] = {[0] = 0};
while (*str)
++number[ctoi(*str++)];
for (int i=0; i<10; ++i)
if (number[i] != 1)
return false;
return true;
}
```