/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 336.0 KiB
#2 Wrong Answer 1ms 364.0 KiB
#3 Wrong Answer 1ms 408.0 KiB

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\n",i);
                count++;
                break;
                
            }
            
            
            
        }
        if(count==0)
        {
            printf("-1\n");
        }
        
        
        
        
        
        
        
        
        
        
    }
    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:34:31
Judged At
2024-11-11 03:41:53
Judged By
Score
2
Total Time
1ms
Peak Memory
408.0 KiB