66_test_p1,2
This commit is contained in:
parent
21550c17d0
commit
067d2d43ad
|
@ -0,0 +1,3 @@
|
|||
# 标题
|
||||
|
||||
* 内容
|
|
@ -0,0 +1 @@
|
|||
#
|
Binary file not shown.
|
@ -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;
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
1 48
|
|
@ -0,0 +1 @@
|
|||
501 834
|
|
@ -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
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# 标题
|
||||
|
||||
* 内容
|
|
@ -0,0 +1 @@
|
|||
#
|
Binary file not shown.
|
@ -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;
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
6 3 2
|
|
@ -0,0 +1 @@
|
|||
100 50 4
|
|
@ -0,0 +1 @@
|
|||
100 50 0
|
|
@ -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
|
||||
|
Loading…
Reference in New Issue