8.18下午

This commit is contained in:
ljcjames 2022-08-18 17:54:44 +08:00
parent 1e5c764043
commit 259fbeaeaf
12 changed files with 63 additions and 2 deletions

View File

@ -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=

BIN
8.16/P-LargeDivision/P.pdf (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -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

View File

@ -0,0 +1 @@
#

View File

@ -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]);
}

View File

View File

View File

View File

@ -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

BIN
8.18.威尔逊定理/威尔逊定理.pdf (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -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++)
{