/*#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
int isprime(int n) //n이 소수이면 1을 리턴 아니면 0을 리턴
{
for(int i=0;i<n;i++){
if(n%i==0){
return 0;
}
else{
return 1;
}
}
}
// nums_len은 배열 nums의 길이입니다.
int solution(int nums[], size_t nums_len) {
int answer = -1;
return answer;
}*/
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
// nums_len은 배열 nums의 길이입니다.
int solution(int nums[], size_t nums_len) {
int answer = 0;
int sum = 0;
for(int i=0;i<nums_len;i++){
for(int j=i+1;j<nums_len;j++){
for(int k=j+1;k<nums_len;k++){
sum = nums[i]+nums[j]+nums[k];
int count = 0;
//약수의 개수를 구하는 반복문
for(int h=2;h<sum;h++){
if(sum%h==0)
count++;
}
if(count==0)
answer++;
}
}
}
return answer;
}
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
// 파라미터로 주어지는 문자열은 const로 주어집니다. 변경하려면 문자열을 복사해서 사용하세요.
char* solution(const char* phone_number) {
// return 값은 malloc 등 동적 할당을 사용해주세요. 할당 길이는 상황에 맞게 변경해주세요.
char* answer = (char*)malloc(sizeof(char)*strlen(phone_number)+1);
strcpy(answer, phone_number);
for(int i=0; i<strlen(phone_number)-4; i++){
answer[i]='*';
}
return answer;
}