Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean[] solve(int a[], char signs[], int b[], int[] c) {
- boolean ans[] = new boolean[a.length];
- for (int i = 0; i < a.length; i++) {
- if (signs[i] == '+') {
- ans[i] = a[i] + b[i] == c[i];
- } else {
- ans[i] = a[i] - b[i] == c[i];
- }
- }
- return ans;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement