摘要: char * dayOfTheWeek(int day, int month, int year){ int i,j,days=0; char* weeks[]={"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "S 阅读全文
posted @ 2020-11-23 14:40 温暖了寂寞 阅读(93) 评论(0) 推荐(0) 编辑
摘要: int dayOfYear(char * date){ int day, year, month, sum=0; int monthArr[]={0,31,59,90,120,151,181,212,243,273,304,334,365}; sscanf(strtok(date,"-"), "%d 阅读全文
posted @ 2020-11-23 12:05 温暖了寂寞 阅读(68) 评论(0) 推荐(0) 编辑
摘要: int* decompressRLElist(int* nums, int numsSize, int* returnSize){ int* arr=(int*)calloc(10000,sizeof(int)); int i,j,pst=0; for(i=0; i<numsSize; i+=2){ 阅读全文
posted @ 2020-11-23 11:20 温暖了寂寞 阅读(54) 评论(0) 推荐(0) 编辑
摘要: char * freqAlphabets(char * s){ char arr[2000]={0}; int i,pst=1001, len=strlen(s); for(i=len-1; i>=0;){ if(s[i] == '#'){ arr[--pst]=(s[i-2]-'0')*10 + 阅读全文
posted @ 2020-11-23 10:50 温暖了寂寞 阅读(69) 评论(0) 推荐(0) 编辑
摘要: int* fraction(int* cont, int contSize, int* returnSize){ int* arr=(int*)calloc(sizeof(int),2); arr[0]=1; arr[1]=0; for (int i=contSize-1; i>=0; i--) { 阅读全文
posted @ 2020-11-23 10:06 温暖了寂寞 阅读(77) 评论(0) 推荐(0) 编辑
摘要: char * defangIPaddr(char * address){ int len = strlen(address); char* s = (char*)calloc(sizeof(char), len*2); char* buffer; buffer = strtok(address, " 阅读全文
posted @ 2020-11-23 00:46 温暖了寂寞 阅读(57) 评论(0) 推荐(0) 编辑