Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Question

Commonmark migration
Source Link

#Generate me a QFP chip!

Generate me a QFP chip!

From the sandbox!

QFP is a type of form factor for an electrical component where pins come out the sides of a chip. Here are is a picture of a typical QFP component:
enter image description here

you can see that the general formula is to have 4 sides of equal numbers of pins.

Your challenge is to create a program that takes in an integer, thich represents the number of pins on one side, and creates an ASCII QFP component with numbered pins.

Input:

a single integer which represents the number of pins on one side

Output:

An ASCII QFP chip with an apropriate pinout.

Example:

input:1

 4
 ┌┴┐
1┤ ├3
 └┬┘
 2

input:2

 87
 ┌┴┴┐
1┤ ├6
2┤ ├5
 └┬┬┘
 34

input:12

 444444444333
 876543210987
 ┌┴┴┴┴┴┴┴┴┴┴┴┴┐
 1┤ ├36
 2┤ ├35
 3┤ ├34
 4┤ ├33
 5┤ ├32
 6┤ ├31
 7┤ ├30
 8┤ ├29
 9┤ ├28
10┤ ├27
11┤ ├26
12┤ ├25
 └┬┬┬┬┬┬┬┬┬┬┬┬┘
 111111122222
 345678901234

Rules:

  • all QFP chips must be enclosed and sealed as well as ascii provides. spacing is of utmost importance. Dust inside a microprocessor is bad stuff!
  • pin numbering must be done as in the examples (Read left to right, top to bottom, numbered counter clockwise)
  • You may start numbering at 0, but this must not affect the chip (an input of 12 still needs 12 pins per side)
  • The only valid characers in your output are 1,2,3,4,5,6,7,8,9,0,┌,┴,┐,├,┘,┬,└,┤, spaces, and newlines.
  • all encodings for languages are allowed, but your output MUST be consistent with the rules above.

This is a codegolf, and as such, The code with the least number of bytes wins! Good Luck!

#Generate me a QFP chip!

From the sandbox!

QFP is a type of form factor for an electrical component where pins come out the sides of a chip. Here are is a picture of a typical QFP component:
enter image description here

you can see that the general formula is to have 4 sides of equal numbers of pins.

Your challenge is to create a program that takes in an integer, thich represents the number of pins on one side, and creates an ASCII QFP component with numbered pins.

Input:

a single integer which represents the number of pins on one side

Output:

An ASCII QFP chip with an apropriate pinout.

Example:

input:1

 4
 ┌┴┐
1┤ ├3
 └┬┘
 2

input:2

 87
 ┌┴┴┐
1┤ ├6
2┤ ├5
 └┬┬┘
 34

input:12

 444444444333
 876543210987
 ┌┴┴┴┴┴┴┴┴┴┴┴┴┐
 1┤ ├36
 2┤ ├35
 3┤ ├34
 4┤ ├33
 5┤ ├32
 6┤ ├31
 7┤ ├30
 8┤ ├29
 9┤ ├28
10┤ ├27
11┤ ├26
12┤ ├25
 └┬┬┬┬┬┬┬┬┬┬┬┬┘
 111111122222
 345678901234

Rules:

  • all QFP chips must be enclosed and sealed as well as ascii provides. spacing is of utmost importance. Dust inside a microprocessor is bad stuff!
  • pin numbering must be done as in the examples (Read left to right, top to bottom, numbered counter clockwise)
  • You may start numbering at 0, but this must not affect the chip (an input of 12 still needs 12 pins per side)
  • The only valid characers in your output are 1,2,3,4,5,6,7,8,9,0,┌,┴,┐,├,┘,┬,└,┤, spaces, and newlines.
  • all encodings for languages are allowed, but your output MUST be consistent with the rules above.

This is a codegolf, and as such, The code with the least number of bytes wins! Good Luck!

Generate me a QFP chip!

From the sandbox!

QFP is a type of form factor for an electrical component where pins come out the sides of a chip. Here are is a picture of a typical QFP component:
enter image description here

you can see that the general formula is to have 4 sides of equal numbers of pins.

Your challenge is to create a program that takes in an integer, thich represents the number of pins on one side, and creates an ASCII QFP component with numbered pins.

Input:

a single integer which represents the number of pins on one side

Output:

An ASCII QFP chip with an apropriate pinout.

Example:

input:1

 4
 ┌┴┐
1┤ ├3
 └┬┘
 2

input:2

 87
 ┌┴┴┐
1┤ ├6
2┤ ├5
 └┬┬┘
 34

input:12

 444444444333
 876543210987
 ┌┴┴┴┴┴┴┴┴┴┴┴┴┐
 1┤ ├36
 2┤ ├35
 3┤ ├34
 4┤ ├33
 5┤ ├32
 6┤ ├31
 7┤ ├30
 8┤ ├29
 9┤ ├28
10┤ ├27
11┤ ├26
12┤ ├25
 └┬┬┬┬┬┬┬┬┬┬┬┬┘
 111111122222
 345678901234

Rules:

  • all QFP chips must be enclosed and sealed as well as ascii provides. spacing is of utmost importance. Dust inside a microprocessor is bad stuff!
  • pin numbering must be done as in the examples (Read left to right, top to bottom, numbered counter clockwise)
  • You may start numbering at 0, but this must not affect the chip (an input of 12 still needs 12 pins per side)
  • The only valid characers in your output are 1,2,3,4,5,6,7,8,9,0,┌,┴,┐,├,┘,┬,└,┤, spaces, and newlines.
  • all encodings for languages are allowed, but your output MUST be consistent with the rules above.

This is a codegolf, and as such, The code with the least number of bytes wins! Good Luck!

Tweeted twitter.com/StackCodeGolf/status/806644089731039233
edited tags
Link
DJMcMayhem
  • 60.1k
  • 18
  • 203
  • 352
edited body
Source Link
tuskiomi
  • 3.9k
  • 2
  • 20
  • 42

#Generate me a QFP chip!

From the sandbox!

QFP is a type of form factor for an electrical component where pins come out the sides of a chip. Here are is a picture of a typical QFP component:
enter image description here

you can see that the general formula is to have 4 sides of equal numbers of pins.

Your challenge is to create a program that takes in an integer, thich represents the number of pins on one side, and creates an ASCII QFP component with numbered pins.

Input:

a single integer which represents the number of pins on one side

Output:

An asciiASCII QFP chip with an apropriate pinout.

Example:

input:1

 4
 ┌┴┐
1┤ ├3
 └┬┘
 2

input:2

 87
 ┌┴┴┐
1┤ ├6
2┤ ├5
 └┬┬┘
 34

input:12

 444444444333
 876543210987
 ┌┴┴┴┴┴┴┴┴┴┴┴┴┐
 1┤ ├36
 2┤ ├35
 3┤ ├34
 4┤ ├33
 5┤ ├32
 6┤ ├31
 7┤ ├30
 8┤ ├29
 9┤ ├28
10┤ ├27
11┤ ├26
12┤ ├25
 └┬┬┬┬┬┬┬┬┬┬┬┬┘
 111111122222
 345678901234

Rules:

  • all QFP chips must be enclosed and sealed as well as ascii provides. spacing is of utmost importance. Dust inside a microprocessor is bad stuff!
  • pin numbering must be done as in the examples (Read left to right, top to bottom, numbered counter clockwise)
  • You may start numbering at 0, but this must not affect the chip (an input of 12 still needs 12 pins per side)
  • The only valid characers in your output are 1,2,3,4,5,6,7,8,9,0,┌,┴,┐,├,┘,┬,└,┤, spaces, and newlines.
  • all encodings for languages are allowed, but your output MUST be consistent with the rules above.

This is a codegolf, and as such, The code with the least number of bytes wins! Good Luck!

#Generate me a QFP chip!

From the sandbox!

QFP is a type of form factor for an electrical component where pins come out the sides of a chip. Here are is a picture of a typical QFP component:
enter image description here

you can see that the general formula is to have 4 sides of equal numbers of pins.

Your challenge is to create a program that takes in an integer, thich represents the number of pins on one side, and creates an ASCII QFP component with numbered pins.

Input:

a single integer which represents the number of pins on one side

Output:

An ascii QFP chip with an apropriate pinout.

Example:

input:1

 4
 ┌┴┐
1┤ ├3
 └┬┘
 2

input:2

 87
 ┌┴┴┐
1┤ ├6
2┤ ├5
 └┬┬┘
 34

input:12

 444444444333
 876543210987
 ┌┴┴┴┴┴┴┴┴┴┴┴┴┐
 1┤ ├36
 2┤ ├35
 3┤ ├34
 4┤ ├33
 5┤ ├32
 6┤ ├31
 7┤ ├30
 8┤ ├29
 9┤ ├28
10┤ ├27
11┤ ├26
12┤ ├25
 └┬┬┬┬┬┬┬┬┬┬┬┬┘
 111111122222
 345678901234

Rules:

  • all QFP chips must be enclosed and sealed as well as ascii provides. spacing is of utmost importance.
  • pin numbering must be done as in the examples (Read left to right, top to bottom, numbered counter clockwise)
  • You may start numbering at 0, but this must not affect the chip (an input of 12 still needs 12 pins per side)
  • The only valid characers in your output are 1,2,3,4,5,6,7,8,9,0,┌,┴,┐,├,┘,┬,└,┤, spaces, and newlines.
  • all encodings for languages are allowed, but your output MUST be consistent with the rules above.

This is a codegolf, and as such, The code with the least number of bytes wins! Good Luck!

#Generate me a QFP chip!

From the sandbox!

QFP is a type of form factor for an electrical component where pins come out the sides of a chip. Here are is a picture of a typical QFP component:
enter image description here

you can see that the general formula is to have 4 sides of equal numbers of pins.

Your challenge is to create a program that takes in an integer, thich represents the number of pins on one side, and creates an ASCII QFP component with numbered pins.

Input:

a single integer which represents the number of pins on one side

Output:

An ASCII QFP chip with an apropriate pinout.

Example:

input:1

 4
 ┌┴┐
1┤ ├3
 └┬┘
 2

input:2

 87
 ┌┴┴┐
1┤ ├6
2┤ ├5
 └┬┬┘
 34

input:12

 444444444333
 876543210987
 ┌┴┴┴┴┴┴┴┴┴┴┴┴┐
 1┤ ├36
 2┤ ├35
 3┤ ├34
 4┤ ├33
 5┤ ├32
 6┤ ├31
 7┤ ├30
 8┤ ├29
 9┤ ├28
10┤ ├27
11┤ ├26
12┤ ├25
 └┬┬┬┬┬┬┬┬┬┬┬┬┘
 111111122222
 345678901234

Rules:

  • all QFP chips must be enclosed and sealed as well as ascii provides. spacing is of utmost importance. Dust inside a microprocessor is bad stuff!
  • pin numbering must be done as in the examples (Read left to right, top to bottom, numbered counter clockwise)
  • You may start numbering at 0, but this must not affect the chip (an input of 12 still needs 12 pins per side)
  • The only valid characers in your output are 1,2,3,4,5,6,7,8,9,0,┌,┴,┐,├,┘,┬,└,┤, spaces, and newlines.
  • all encodings for languages are allowed, but your output MUST be consistent with the rules above.

This is a codegolf, and as such, The code with the least number of bytes wins! Good Luck!

Source Link
tuskiomi
  • 3.9k
  • 2
  • 20
  • 42
Loading

AltStyle によって変換されたページ (->オリジナル) /