Submission #2060987
Source Code Expand
import std.stdio;
import std.math;
void main(){
ulong x,y;
readf("%d %d", &x, &y);
if(y % x == 0){
"-1".writeln;
return;
}
for(int i = 2; ; ++i){
ulong n = x * i;
if(n > pow(10,18)){
"-1".writeln;
break;
}
if(n % y != 0){
n.writeln;
break;
}
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Two Integers |
| User | ray45422 |
| Language | D (LDC 0.17.0) |
| Score | 0 |
| Code Size | 301 Byte |
| Status | WA |
| Exec Time | 2103 ms |
| Memory | 256 KiB |
Judge Result
| Set Name | Sample | All | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 100 | ||||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 0_000.txt, 0_001.txt |
| All | 0_000.txt, 0_001.txt, 1_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt, 1_010.txt, 1_011.txt, 1_012.txt, 1_013.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 0_000.txt | AC | 1 ms | 256 KiB |
| 0_001.txt | AC | 1 ms | 256 KiB |
| 1_002.txt | AC | 1 ms | 256 KiB |
| 1_003.txt | AC | 1 ms | 256 KiB |
| 1_004.txt | TLE | 2103 ms | 256 KiB |
| 1_005.txt | WA | 1 ms | 256 KiB |
| 1_006.txt | WA | 1 ms | 256 KiB |
| 1_007.txt | AC | 1 ms | 256 KiB |
| 1_008.txt | TLE | 2103 ms | 256 KiB |
| 1_009.txt | AC | 1 ms | 256 KiB |
| 1_010.txt | TLE | 2103 ms | 256 KiB |
| 1_011.txt | TLE | 2103 ms | 256 KiB |
| 1_012.txt | AC | 1 ms | 256 KiB |
| 1_013.txt | AC | 1 ms | 256 KiB |
| for_sample.txt | AC | 1 ms | 256 KiB |