Wrong Answer
Code
// Online C compiler to run C program online
#include <stdio.h>
int main() {
// Write C code here
int t;
scanf("%d",&t);
while(t--)
{
int a,b,c,x;
scanf("%d%d%d%d",&a,&b,&c,&x);
int count=0;
for(int i=1;i<x;i++)
{
if(i%a==0&&i%b==0&&i%c==0)
{
printf("%d",i);
count++;
break;
}
}
if(count==0)
{
printf("-1");
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1025 GCM
- Contest
- Brain booster #2
- Language
- C11 (GCC 13.2.0)
- Submit At
- 2024-03-06 14:32:45
- Judged At
- 2024-11-11 03:41:53
- Judged By
- Score
- 0
- Total Time
- 1ms
- Peak Memory
- 332.0 KiB