You are on page 1of 4

E

COMP6047 – Algorithm and Programming

T
T
NO
BU
Triplet
Jojo has successfully registered to take part in the BRICSMATH competition. Therefore,
he wanted to practice before taking part in this race. Besides practicing, Jojo also wants
to try the online answer clarification feature that has been prepared by the competition
organizer.

R I
O
In the first question, Jojo got 3 numbers. In this problem, Jojo is ordered to prove
whether 2 numbers of the 3 numbers can be form the remaining number. Jojo is given
the freedom to calculate by adding, subtracting, multiplying, or dividing operations.
T
Then, Jojo uses one of the convenient programming languages to write the answers.
D

As one of the participants in BRICSMATH, you are welcome to try this race system as
S
well. If there are problems when trying this system, don’t hesitate to ask the judges
through the clarification feature.
DI

Format Input
The input of this question starts with a number T which indicates the number of test
cases in this question. Then, the next T line consists of 3 numbers A, B, and C.
OT
UT
RE

Format Output
The output of this question consists of a T line that confirms whether it is “POSSIBLE”
or “IMPOSSIBLE” based on the instruction from the question.
N
IB
Constraints
• 1 ≤ T ≤ 100

• 1 ≤ A, B, C ≤ 109
TR
DO
IS
ED

© School of Computer Science - BINUS, 2020. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
For those who violated this disclaimer, academic sanctioned can be enforced.
COMP6047 – Algorithm and Programming

Sample Input (standard input)


3
1 2 3
2 24 12
9 6 2

Sample Output (standard output)


POSSIBLE
POSSIBLE
IMPOSSIBLE

© School of Computer Science - BINUS, 2020. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
For those who violated this disclaimer, academic sanctioned can be enforced.
COMP6047 – Algorithm and Programming

Triplet
Jojo telah berhasil mendaftarkan diri untuk mengikuti lomba BRICSMATH. Oleh karena
itu, ia ingin berlatih sebelum mengikuti perlombaan ini. Selain berlatih, Jojo juga ingin
mencoba fitur klarifikasi jawaban secara online yang sudah disiapkan oleh penyelenggara
lomba.

Pada soal pertama, Jojo mendapatkan 3 buah angka. Pada soal ini, Jojo diperintahkan
untuk membuktikan apakah 2 dari 3 angka tersebut dapat membentuk angka yang tersisa.
Jojo diberikan kebebasan untuk menghitung dengan operasi pertambahan, pengurangan,
perkalian, ataupun pembagian. Lalu Jojo menggunakan salah satu bahasa pemrograman
yang nyaman untuk menuliskan jawaban.

Sebagai salah satu peserta BRICSMATH, anda dipersilahkan mencoba sistem perlombaan
ini juga. Apabila terdapat kendala pada saat mencoba sistem ini, jangan sungkan untuk
menanyakannya pada juri melalui fitur klarifikasi.

Format Input
Sebuah bilangan T yang menunjukkan banyaknya kasus uji pada soal ini. Kemudian, T
baris berikutnya terdiri dari 3 buah angka A, B dan C.

Format Output
Output soal ini terdiri dari T baris yang berisi konfirmasi apakah “POSSIBLE” atau
“IMPOSSIBLE” berdasarkan perintah dari soal.

Constraints
• 1 ≤ T ≤ 100

• 1 ≤ A, B, C ≤ 109

© School of Computer Science - BINUS, 2020. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
For those who violated this disclaimer, academic sanctioned can be enforced.
COMP6047 – Algorithm and Programming

Sample Input (standard input)


3
1 2 3
2 24 12
9 6 2

Sample Output (standard output)


POSSIBLE
POSSIBLE
IMPOSSIBLE

© School of Computer Science - BINUS, 2020. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
For those who violated this disclaimer, academic sanctioned can be enforced.

You might also like