csuoj 1392: Number Trick
http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1392
1392: Number Trick
Time Limit: 1 Sec Memory Limit: 128 MB
Submit: 200 Solved: 36
[Submit][Status][Web Board]
Description
Input
Output
Sample Input
2.6
Sample Output
135
270
135135
270270
HINT
分析:
给一个小数X,找个A使得:AX=(A循环左移一位)
首先,假设A为一个满足题目条件的数,有n个数位,且最高位数字为A 0 。
那么可列出方程:AX=(A-A 0* 10 n-1 )*10+A 0————>> A 0 *(10 n -1)=A*(10-X)
也就是说,只要n和A 0 确定了,A也就可以唯一确定。
那么我们只要直接枚举:n=(1->8) A 0 =(1->9)
计算出A是不是满足这两个条件就可以得出正确答案了。
AC代码:
#include <cstdio>
typedef long long ll;
using namespace std; int power[],a[],ans=;
float x,tmpx;//不知道为什么用double会wa
ll f1,f2; int digit(ll tmp)
{
int tot=;
while(tmp) tot++,tmp/=;
return tot;
} int head(ll tmp)
{
for (; tmp>=; tmp/=);
return tmp;
} int main()
{
power[]=;
for (int i=; i<=; i++) power[i]=power[i-]*;
scanf("%f",&x);
if (x>=)
{
printf("No solution\n");
return ;
}
for (int i=; i<=; i++)//枚举总共几个数位
for (int j=; j<=; j++)//枚举开头数字
{
tmpx=-*x;
f1=(int)tmpx;
f2=(ll)*(power[i]-)*j;
if (f2%f1!=) continue;
f2/=f1;
if (digit(f2)==i && head(f2)==j) a[++ans]=f2;
}
if (ans==) printf("No solution\n");
else for (int i=; i<=ans; i++) printf("%d\n",a[i]);
return ;
}
学长打表:
//#include <cstdio>
//#include <cstring>
//
//using namespace std ;
//
//typedef long long LL ;
//
//LL change( LL a ) {
// LL data[32] ;
// int cur = 0 ;
// while( a ) {
// data[cur++] = a % 10LL ;
// a /= 10LL ;
// }
// LL ans = 0 ;
// for( int i = cur - 2 ; i >= 0 ; i -- ) {
// ans = ans * 10 + data[i] ;
// }
// ans = ans * 10 + data[cur-1] ;
// return ans ;
//}
//
//int main() {
//
// freopen("out.txt","w",stdout);
// int cnt = 0 ;
// printf("void init() {\n") ;
// for( LL a = 1LL ; a <= 100000000LL ; a ++ ) {
// LL b = change( a ) ;
// if( 10000LL * b % a == 0 ) {
// LL t = 10000LL * b / a ;
// //ans[t].push_back(a) ;
// printf("ans[%lld].push_back(%lld);" , t , a ) ;
// if( ++cnt == 100 ) {
// printf("\n") ;
// cnt = 0 ;
// }
// }
// }
// printf("\n}\n") ;
//
// return 0 ;
//} #include <vector>
#include <cstdio>
#include <cstring> using namespace std ; typedef long long LL ; vector<int> ans[+] ;
void init() {
ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();
ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();
ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();
ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();
ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();
ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();
ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();
ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();
ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();
ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();ans[].push_back();
} int main() { init() ;
double n ;
while( scanf("%lf" , &n ) == ) {
int a = (int)( n * + 0.5 ) ;
if( ans[a].size() == ) printf("No solution\n") ;
else {
for( int i = ; i < ans[a].size() ; i ++ ) {
printf("%d\n" , ans[a][i] ) ;
}
}
} return ;
}
csuoj 1392: Number Trick的更多相关文章
- CSUOJ 1299 - Number Transformation II 打表预处理水DP
http://122.207.68.93/OnlineJudge/problem.php?id=1299 第二个样例解释.. 3 6 3->4->6..两步.. 由此可以BFS也可以DP. ...
- 2014 UESTC 暑前集训队内赛(1) 解题报告
A.Planting Trees 排序+模拟 常识问题,将耗时排一个序,时间长的先种,每次判断更新最后一天的时间. 代码: #include <iostream> #include < ...
- digital root问题
问题阐述会是这样的: Given a non-negative integer num, repeatedly add all its digits until the result has only ...
- csuoj 1353: Guessing the Number
这个题我想到要用kmp找到循环节: 但是后面的我就不会做了: 看到题解才知道是字符串的最小表示: #include<cstdio> #include<cstring> #inc ...
- 【LeetCode】Single Number I & II & III
Single Number I : Given an array of integers, every element appears twice except for one. Find that ...
- UESTC 890 Card Trick(DP 纸牌魔术)
题意 给你一些牌 所有正面朝下放桌子上 你选一个起点 翻开那张牌 牌上的数字是几就向前走几步 J,Q,K 都是向前走10步 A向前走11步 知道向前走相应的步数后超过了终点 ...
- hihoCoder 1392 War Chess 【模拟】 (ACM-ICPC国际大学生程序设计竞赛北京赛区(2016)网络赛)
#1392 : War Chess 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 Rainbow loves to play kinds of War Chess gam ...
- [Google Code Jam (Qualification Round 2014) ] A. Magic Trick
Problem A. Magic Trick Small input6 points You have solved this input set. Note: To advance to the ...
- [LeetCode] Number of Distinct Islands II 不同岛屿的个数之二
Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) conn ...
随机推荐
- 洛谷 P2737 [USACO4.1]麦香牛块Beef McNuggets Label:一点点数论 && 背包
题目描述 农夫布朗的奶牛们正在进行斗争,因为它们听说麦当劳正在考虑引进一种新产品:麦香牛块.奶牛们正在想尽一切办法让这种可怕的设想泡汤.奶牛们进行斗争的策略之一是“劣质的包装”.“看,”奶牛们说,“如 ...
- erlang mac os 10.9 卸载脚本
#!/bin/bash if [ "$(id -u)" != "0" ]; then echo "Insufficient permissions. ...
- Xcode开发中 Code Snippets Library 的相关用法
当在进行项目的时候,总会遇到很多相同的写法.因此,我们可以使用Code Snippets Library 来进行代码小片段的“封装”: 以Xcode中常用的属性为例: 使用步骤如下: 1.在Xcode ...
- TEST===>Sqlserver中获取年月日时分秒
可以用两种方法获取 1. select GETDATE() as '当前日期', DateName(year,GetDate()) as '年', DateName(month,GetDate()) ...
- JS正则表达式将url转成json格式
var url = location.search.substr(1); param = {}; console.log(url); url.replace(/([^?&]+)=([^?&am ...
- 【Scala】尾递归优化
以递归方式思考 递归通过灵巧的函数定义,告诉计算机做什么.在函数式编程中,随处可见递归思想的运用.下面给出几个递归函数的例子: object RecursiveExample extends App{ ...
- IOS网络第二天 - 06-POST请求
************POST请求 #import "HMViewController.h" #import "MBProgressHUD+MJ.h" @in ...
- 树状结构Java模型、层级关系Java模型、上下级关系Java模型与html页面展示
树状结构Java模型.层级关系Java模型.上下级关系Java模型与html页面展示 一.业务原型:公司的组织结构.传销关系网 二.数据库模型 很简单,创建 id 与 pid 关系即可.(pid:pa ...
- 常用数据存储集合与Map
一.常见的数据存储实现 二.遍历 1.集合 新循环 迭代器 Iterator Iterator<?> it = C.iterator(); // 问.取.删 it.hasNext() ...
- Sping