Description It seems like the year of 2013 came only yesterday. Do you know a curious fact? The year of 2013 is the first year after the old 1987 with only distinct digits. Now you are suggested to solve the following problem: given a year number, fi…
Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example:Given "25525511135", return ["255.255.11.135", "255.255.111.35"]. (Order does not matter) 这道题要求是复原IP地址,IP地…
ps:WA了两次好像....Sky数是三个进制下的各位数之和相等...而不是都等于22...我傻逼了... 代码: #include "stdio.h" int inp(int a,int n); int main(){ int n,k; while(~scanf("%d",&n) && n){ )==inp(n,) && inp(n,)==inp(n,)){ printf("%d is a Sky Number.\…