Skip to main content
Post Closed as "Needs details or clarity" by CommunityBot, george, Wheat Wizard, Peter Taylor
Post Reopened by user41805, DJMcMayhem, acrolith, Riker, Bassdrop Cumberwubwubwub
deleted 322 characters in body
Source Link

Your goal is to create a program. It must take input indefinitely.

Here is a sample run (the > shows that the line is the output from the program)

2,6 > The wires were not connected. Connecting them...0 5,6 > The wires were not connected. Connecting them...0 7,5 > The wires were not connected. Connecting them...0 2,7 > These wires are already connected. No need to connect them again.1 

Since 2 is connected to 6, which in turn is connected to 5 and then 7, 2 and 7 are hence connected.

5,2 > These wires are already connected. No need to connect them again.1 ... 

###Clarifications

Whenever the user writes any two numbers (separated by any delimiter you prefer), the program must output whether they are connected or not. If they are not connected, the program must output a falsy value (the string shown above in the sample run is just an example0), however if the wires are connected, the program must output a true value (1).

"We are to interpret the pair p-q as meaning “p is connected to q.” We assume the relation “is connected to” to be transitive: If p is connected to q, and q is connected to r, then p is connected to r."

The input must be separated from the output by a newline \n

The input will always be integers in base ten and never floats.

This is , so the program with the shortest bytecount wins!

Your goal is to create a program. It must take input indefinitely.

Here is a sample run (the > shows that the line is the output from the program)

2,6 > The wires were not connected. Connecting them... 5,6 > The wires were not connected. Connecting them... 7,5 > The wires were not connected. Connecting them... 2,7 > These wires are already connected. No need to connect them again. 

Since 2 is connected to 6, which in turn is connected to 5 and then 7, 2 and 7 are hence connected.

5,2 > These wires are already connected. No need to connect them again. ... 

###Clarifications

Whenever the user writes any two numbers (separated by any delimiter you prefer), the program must output whether they are connected or not. If they are not connected, the program must output a falsy value (the string shown above in the sample run is just an example), however if the wires are connected, the program must output a true value.

"We are to interpret the pair p-q as meaning “p is connected to q.” We assume the relation “is connected to” to be transitive: If p is connected to q, and q is connected to r, then p is connected to r."

The input must be separated from the output by a newline \n

The input will always be integers in base ten and never floats.

This is , so the program with the shortest bytecount wins!

Your goal is to create a program. It must take input indefinitely.

Here is a sample run (the > shows that the line is the output from the program)

2,6 > 0 5,6 > 0 7,5 > 0 2,7 > 1 

Since 2 is connected to 6, which in turn is connected to 5 and then 7, 2 and 7 are hence connected.

5,2 > 1 ... 

###Clarifications

Whenever the user writes any two numbers (separated by any delimiter you prefer), the program must output whether they are connected or not. If they are not connected, the program must output a falsy value (0), however if the wires are connected, the program must output a true value (1).

"We are to interpret the pair p-q as meaning “p is connected to q.” We assume the relation “is connected to” to be transitive: If p is connected to q, and q is connected to r, then p is connected to r."

The input must be separated from the output by a newline \n

The input will always be integers in base ten and never floats.

This is , so the program with the shortest bytecount wins!

deleted 2 characters in body
Source Link
user41805
  • 13.4k
  • 6
  • 43
  • 88

Your goal is to create a program. It must take input indefinitely.

Here is a sample run (the > shows that the line is the output from the program)

2,6 > The wires were not connected. Connecting them... 5,6 > The wires were not connected. Connecting them... 7,5 > The wires were not connected. Connecting them... 2,7 > These wires are already connected. No need to connect them again. 

Since 2 is connected to 6, which in turn is connected to 5 and then 7, 2 and 7 are hence connected.

5,2 > These wires are already connected. No need to connect them again. ... 

###Clarifications

Whenever the user writes any two numbers (separated by any delimiter you prefer), the program must output whether they are connected or not. If they are not connected, the program must output a falsy value (the string shown above in the sample run is just an example), however if the wires are connected, the program must output a true value.

"We are to interpret the pair p-q as meaning “p is connected to q.” We assume the relation “is connected to” to be transitive: If p is connected to q, and q is connected to r, then p is connected to r."

The input must be separated from the output by a newline \n

The input will always be integers in base ten and never decimalsfloats.

This is , so the program with the shortest bytecount wins!

Your goal is to create a program. It must take input indefinitely.

Here is a sample run (the > shows that the line is the output from the program)

2,6 > The wires were not connected. Connecting them... 5,6 > The wires were not connected. Connecting them... 7,5 > The wires were not connected. Connecting them... 2,7 > These wires are already connected. No need to connect them again. 

Since 2 is connected to 6, which in turn is connected to 5 and then 7, 2 and 7 are hence connected.

5,2 > These wires are already connected. No need to connect them again. ... 

###Clarifications

Whenever the user writes any two numbers (separated by any delimiter you prefer), the program must output whether they are connected or not. If they are not connected, the program must output a falsy value (the string shown above in the sample run is just an example), however if the wires are connected, the program must output a true value.

"We are to interpret the pair p-q as meaning “p is connected to q.” We assume the relation “is connected to” to be transitive: If p is connected to q, and q is connected to r, then p is connected to r."

The input must be separated from the output by a newline \n

The input will always be integers in base ten and never decimals.

This is , so the program with the shortest bytecount wins!

Your goal is to create a program. It must take input indefinitely.

Here is a sample run (the > shows that the line is the output from the program)

2,6 > The wires were not connected. Connecting them... 5,6 > The wires were not connected. Connecting them... 7,5 > The wires were not connected. Connecting them... 2,7 > These wires are already connected. No need to connect them again. 

Since 2 is connected to 6, which in turn is connected to 5 and then 7, 2 and 7 are hence connected.

5,2 > These wires are already connected. No need to connect them again. ... 

###Clarifications

Whenever the user writes any two numbers (separated by any delimiter you prefer), the program must output whether they are connected or not. If they are not connected, the program must output a falsy value (the string shown above in the sample run is just an example), however if the wires are connected, the program must output a true value.

"We are to interpret the pair p-q as meaning “p is connected to q.” We assume the relation “is connected to” to be transitive: If p is connected to q, and q is connected to r, then p is connected to r."

The input must be separated from the output by a newline \n

The input will always be integers in base ten and never floats.

This is , so the program with the shortest bytecount wins!

edited tags
Link
acrolith
  • 4k
  • 1
  • 25
  • 41
added 245 characters in body; edited tags
Source Link
user41805
  • 13.4k
  • 6
  • 43
  • 88
Loading
added 355 characters in body
Source Link
Loading
added 80 characters in body
Source Link
Loading
added 159 characters in body
Source Link
Loading
Post Closed as "Needs details or clarity" by acrolith, AdmBorkBork, Kade, DJMcMayhem, Blue
Source Link
Loading