8.18下午
This commit is contained in:
parent
1e5c764043
commit
259fbeaeaf
|
@ -0,0 +1,5 @@
|
|||
[{000214A0-0000-0000-C000-000000000046}]
|
||||
Prop3=19,2
|
||||
[InternetShortcut]
|
||||
URL=http://www.51nod.com/Login.html?oldhref=http%3A%2F%2Fwww.51nod.com%2FContest%2FContestDescription.html%23contestId%3D987%26randomCode%3D716111#oldhref=http:%2F%2Fwww.51nod.com%2FContest%2FContestDescription.html%23contestId=987&randomCode=716111
|
||||
IDList=
|
Binary file not shown.
|
@ -0,0 +1,13 @@
|
|||
# P - Large Division
|
||||
* https://vjudge.net/contest/509210#problem/P
|
||||
### 题意
|
||||
高精除单精能否整除
|
||||
### 做法
|
||||
高精除单精
|
||||
### 关键词
|
||||
高精除单精
|
||||
### 易错点
|
||||
* long long
|
||||
* 初始化 a[0]=0;//important?
|
||||
### 工具箱
|
||||
* 高精除单精 https://www.cnblogs.com/lcez56jsy/p/10679029.html
|
|
@ -0,0 +1 @@
|
|||
#
|
|
@ -43,4 +43,4 @@ int main()
|
|||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
//只是高精除单精
|
||||
#include<iostream>
|
||||
#include<cstdio>
|
||||
#include<cmath>
|
||||
#include<cstring>
|
||||
using namespace std;
|
||||
char e[1001];
|
||||
int n,a[1001],c[1001];
|
||||
int main()
|
||||
{
|
||||
scanf("%s",e);
|
||||
int k=strlen(e);
|
||||
scanf("%d",&n);
|
||||
for(int i=k;i>=k;i--)
|
||||
{a[i]=e[k-i]-48;
|
||||
}
|
||||
for(int i=k;i>=1;i--)
|
||||
{
|
||||
c[i]=a[i]/n;
|
||||
a[i]%=n;
|
||||
a[i-1]+=a[i]*10;
|
||||
}
|
||||
while(c[k]==0&&k>1)k--;
|
||||
for(int i=k;i>=1;i--)
|
||||
printf("%d",c[i]);
|
||||
|
||||
}
|
|
@ -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
|
||||
|
Binary file not shown.
|
@ -3,13 +3,15 @@
|
|||
#include<algorithm>
|
||||
#include <cmath>
|
||||
using namespace std;
|
||||
const int N=1e8+5;
|
||||
int main()
|
||||
{
|
||||
int t;
|
||||
int t1=0;
|
||||
int n;
|
||||
scanf("%d",&t);
|
||||
while(t--)
|
||||
{
|
||||
int n;
|
||||
scanf("%d",&n);
|
||||
for(int i=1;i<=n; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue