Submission #1447725
Source Code Expand
#include<stdio.h> int main() { long n,k,x,y,z,m; long i, j; scanf("%ld %ld", &n,&k); for (i = 0; i < n; i++) { if (i == 0) { scanf("%ld", &y); m = y; continue; } scanf("%ld",&x); if (x>m) { m = x; } if (x < y) { z = y; y = x; x = z; } while (x%y != 0) { z = y; y = x%y; x = z; } } if (k%y == 0&&k<=m) { printf("POSSIBLE"); }else{ printf("IMPOSSIBLE"); } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Getting Difference |
User | mikoi |
Language | C (GCC 5.4.1) |
Score | 300 |
Code Size | 467 Byte |
Status | AC |
Exec Time | 13 ms |
Memory | 128 KB |
Compile Error
./Main.c: In function ‘main’: ./Main.c:8:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%ld %ld", &n,&k); ^ ./Main.c:11:4: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%ld", &y); ^ ./Main.c:15:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%ld",&x); ^
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt |
All | sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, subtask_1_01.txt, subtask_1_02.txt, subtask_1_03.txt, subtask_1_04.txt, subtask_1_05.txt, subtask_1_06.txt, subtask_1_07.txt, subtask_1_08.txt, subtask_1_09.txt, subtask_1_10.txt, subtask_1_11.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 1 ms | 128 KB |
sample_02.txt | AC | 1 ms | 128 KB |
sample_03.txt | AC | 1 ms | 128 KB |
sample_04.txt | AC | 1 ms | 128 KB |
subtask_1_01.txt | AC | 1 ms | 128 KB |
subtask_1_02.txt | AC | 1 ms | 128 KB |
subtask_1_03.txt | AC | 13 ms | 128 KB |
subtask_1_04.txt | AC | 13 ms | 128 KB |
subtask_1_05.txt | AC | 7 ms | 128 KB |
subtask_1_06.txt | AC | 2 ms | 128 KB |
subtask_1_07.txt | AC | 8 ms | 128 KB |
subtask_1_08.txt | AC | 12 ms | 128 KB |
subtask_1_09.txt | AC | 5 ms | 128 KB |
subtask_1_10.txt | AC | 9 ms | 128 KB |
subtask_1_11.txt | AC | 11 ms | 128 KB |