66_test_p1,2

This commit is contained in:
James 2020-06-06 09:07:51 +08:00
parent 21550c17d0
commit 067d2d43ad
18 changed files with 98 additions and 0 deletions

3
1483_luckynum/Readme.md Normal file
View File

@ -0,0 +1,3 @@
# 标题
* 内容

View File

@ -0,0 +1 @@
#

Binary file not shown.

25
1483_luckynum/main.cpp Normal file
View File

@ -0,0 +1,25 @@
#include <iostream>
using namespace std;
int main()
{
int a,b,ans;
cin>>a>>b;
for(int i=6;i<=b;i+=6){
ans++;
}
for(int i=8;i<=b;i+=8){
if(i%6!=0){
ans++;
}
}
for(int i=6;i<a;i+=6){
ans--;
}
for(int i=8;i<a;i+=8){
if(i%6!=0){
ans--;
}
}
cout<<ans;
return 0;
}

BIN
1483_luckynum/main.exe Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
1 48

View File

View File

@ -0,0 +1 @@
501 834

View File

@ -0,0 +1,18 @@
## z:\Chao\src\1483_luckynum\test\in.txt
2020/06/06 ÖÜÁù 8:44:00.01
12
-----------------------------------------------
Process exited after 120 ms with return value 0
## z:\Chao\src\1483_luckynum\test\in2.txt
2020/06/06 ÖÜÁù 8:44:00.01
-8
-----------------------------------------------
Process exited after 80 ms with return value 0
## z:\Chao\src\1483_luckynum\test\in3.txt
2020/06/06 ÖÜÁù 8:44:00.01
84
-----------------------------------------------
Process exited after 80 ms with return value 0

3
1484_17sing/Readme.md Normal file
View File

@ -0,0 +1,3 @@
# 标题
* 内容

View File

@ -0,0 +1 @@
#

Binary file not shown.

24
1484_17sing/main.cpp Normal file
View File

@ -0,0 +1,24 @@
#include <iostream>
using namespace std;
int main()
{
int m,n,l;
cin>>m>>n>>l;
int dui=m/2,all=m+n;
if(n<dui){
dui=n;
}
all=all-dui*3;
if(l<=all){
cout<<dui;
return 0;
}
l-=all;
if(l%3==0){
cout<<dui-l/3;
return 0;
}else{
cout<<dui-l/3-1;
return 0;
}
}

BIN
1484_17sing/main.exe Normal file

Binary file not shown.

1
1484_17sing/test/in.txt Normal file
View File

@ -0,0 +1 @@
6 3 2

1
1484_17sing/test/in2.txt Normal file
View File

@ -0,0 +1 @@
100 50 4

1
1484_17sing/test/in3.txt Normal file
View File

@ -0,0 +1 @@
100 50 0

18
1484_17sing/test/out.txt Normal file
View File

@ -0,0 +1,18 @@
## z:\Chao\src\1484_17sing\test\in.txt
2020/06/06 ÖÜÁù 9:01:49.66
2
-----------------------------------------------
Process exited after 170 ms with return value 0
## z:\Chao\src\1484_17sing\test\in2.txt
2020/06/06 ÖÜÁù 9:01:49.66
48
-----------------------------------------------
Process exited after 100 ms with return value 0
## z:\Chao\src\1484_17sing\test\in3.txt
2020/06/06 ÖÜÁù 9:01:49.66
50
-----------------------------------------------
Process exited after 100 ms with return value 0