QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#561634 | #7638. Lake | Fahad134 | WA | 0ms | 1648kb | C++14 | 544b | 2024-09-13 02:59:46 | 2024-09-13 02:59:46 |
Judging History
answer
#include<stdio.h>
int main(){
int a,b,count=0;
scanf("%d %d",&a,&b);
for(int i=1;i<100000;i++){
if(a>=4){
a=a-4;
b=b-3;
count++;
}
else if(a==3){
a=a-3;
b=b-4;
count++;
}
else if(a==2){
a=a-2;
b=b-5;
count++;
}
else if(a==1){
a=a-1;
b=b-6;
count++;
}
else if(a==0){
b=b-7;
count++;
}
if(a<=0 && b<=0){
break;
}
}
int p=count+(count-1);
printf("%d",p);
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 1608kb
input:
1 1
output:
1
result:
ok single line: '1'
Test #2:
score: 0
Accepted
time: 0ms
memory: 1636kb
input:
1 4
output:
1
result:
ok single line: '1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 1576kb
input:
5 5
output:
3
result:
ok single line: '3'
Test #4:
score: 0
Accepted
time: 0ms
memory: 1628kb
input:
4 4
output:
3
result:
ok single line: '3'
Test #5:
score: 0
Accepted
time: 0ms
memory: 1592kb
input:
3 4
output:
1
result:
ok single line: '1'
Test #6:
score: 0
Accepted
time: 0ms
memory: 1648kb
input:
8 12
output:
5
result:
ok single line: '5'
Test #7:
score: 0
Accepted
time: 0ms
memory: 1628kb
input:
12 8
output:
5
result:
ok single line: '5'
Test #8:
score: -100
Wrong Answer
time: 0ms
memory: 1628kb
input:
8182 520051
output:
150923
result:
wrong answer 1st lines differ - expected: '260025', found: '150923'