Submission #4292453


Source Code Expand

Copy
#include <bits/stdc++.h>

using namespace std;

int main() {
  int A, B;
  cin >> A >> B;
  if(B % A == 0) cout << A+B << endl;
  else cout << B-A << endl;
}

Submission Info

Submission Time
Task A - B +/- A
User kivantium
Language C++14 (GCC 5.4.1)
Score 100
Code Size 166 Byte
Status
Exec Time 1 ms
Memory 256 KB

Test Cases

Set Name Score / Max Score Test Cases
All 100 / 100 0_normal_1, 0_normal_2, 0_normal_3, 0_normal_4, 1_hand_1, 1_hand_2, 1_hand_3, 1_hand_4, sample_01, sample_02, sample_03
Sample 0 / 0 sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
0_normal_1 1 ms 256 KB
0_normal_2 1 ms 256 KB
0_normal_3 1 ms 256 KB
0_normal_4 1 ms 256 KB
1_hand_1 1 ms 256 KB
1_hand_2 1 ms 256 KB
1_hand_3 1 ms 256 KB
1_hand_4 1 ms 256 KB
sample_01 1 ms 256 KB
sample_02 1 ms 256 KB
sample_03 1 ms 256 KB