8.18下午
This commit is contained in:
parent
304d6ea774
commit
dc1a3e7bfd
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
#
|
|
@ -0,0 +1,20 @@
|
|||
#include <iostream>
|
||||
#include<cstdio>
|
||||
#include<algorithm>
|
||||
#include <cmath>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
int t;
|
||||
scanf("%d",&t);
|
||||
while(t--)
|
||||
{
|
||||
int n;
|
||||
scanf("%d",&n);
|
||||
for(int i=1;i<=n; i++)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
## z:\Chao\src\Template\test\in.txt
|
||||
2020/03/14 ÖÜÁù 11:41:28.68
|
||||
Hello Easy C++ project!
|
||||
|
||||
-----------------------------------------------
|
||||
Process exited after 200 ms with return value 0
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
# J - Leading and Trailing
|
||||
* https://vjudge.net/contest/509210#problem/J
|
||||
### 题意
|
||||
n^k的前3位、后3位n (2 ≤ n < 2^31) and k (1 ≤ k ≤ 10^7).
|
||||
### 做法
|
||||
1. 后三位快速幂
|
||||
2. 前三位10^ (log10(n^k)==k*log10(n)),整数部分决定0的个数,小数部分决定数字 *100取前三位
|
||||
### 关键词
|
||||
快速幂、求很大的n^k、log10、pow、modf
|
||||
### 易错点
|
||||
* 快速幂中now=n%mod;//要mod否则会太大10e6*10e6
|
||||
* 快速幂忘return
|
||||
* //%03d 001 000 补齐1前面的0
|
||||
* //没有(int)导致没有输出
|
||||
### 工具箱
|
||||
* log10(n^k)==k*log10(n)
|
||||
* pow(10,cur)==10^cur
|
||||
* %03d 001 000 整数用零补齐
|
||||
* y=modf(n,&x);n的小数部分给y,整数部分给x
|
||||
* 题解 https://www.cnblogs.com/KirinSB/p/9409120.html
|
|
@ -0,0 +1 @@
|
|||
#
|
|
@ -0,0 +1,7 @@
|
|||
## z:\Chao\src\Template\test\in.txt
|
||||
2020/03/14 ÖÜÁù 11:41:28.68
|
||||
Hello Easy C++ project!
|
||||
|
||||
-----------------------------------------------
|
||||
Process exited after 200 ms with return value 0
|
||||
|
Loading…
Reference in New Issue