Submission #19557712
Source Code Expand
Copy
#include <bits/stdc++.h> #include <atcoder/segtree.hpp> /* #include <boost/multiprecision/cpp_int.hpp> namespace mp = boost::multiprecision; using Bint = mp::cpp_int;// 任意長整数型 */ #define rep(i,n) for(int i=0; i<n; i++) #define Rep(i,j,n) for(int i=j; i<n; i++) #define PI 3.14159265359 #define INFL 1000100100000000000 #define INF 1000100100 #define MOD 1000000007 #define all(x) (x).begin(),(x).end() typedef long long ll; #define P pair<int, int> #define PL pair<ll, ll> #define PD pair<T,vector<int> > #define T tuple<int,int,int> #define TL tuple<ll,ll,ll> using namespace std; using namespace atcoder; int main(){ ll x,y; cin >> x >> y; if(x%y==0) cout << -1 << endl; else cout << x*y-x << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Two Integers |
User | pureforeverearth |
Language | C++ (GCC 9.2.1) |
Score | 100 |
Code Size | 763 Byte |
Status | AC |
Exec Time | 7 ms |
Memory | 3624 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 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 | 5 ms | 3508 KB |
0_001.txt | AC | 3 ms | 3552 KB |
1_002.txt | AC | 2 ms | 3556 KB |
1_003.txt | AC | 2 ms | 3512 KB |
1_004.txt | AC | 2 ms | 3412 KB |
1_005.txt | AC | 7 ms | 3556 KB |
1_006.txt | AC | 2 ms | 3412 KB |
1_007.txt | AC | 2 ms | 3460 KB |
1_008.txt | AC | 3 ms | 3456 KB |
1_009.txt | AC | 2 ms | 3576 KB |
1_010.txt | AC | 2 ms | 3624 KB |
1_011.txt | AC | 2 ms | 3344 KB |
1_012.txt | AC | 2 ms | 3516 KB |
1_013.txt | AC | 2 ms | 3512 KB |
for_sample.txt | AC | 2 ms | 3456 KB |