benchmarks.wiki / Public workspace

MBPP / 620 / Write a function to find the largest subset where each pair is divisible.

Problem

Answer published by the source. Consult the official source to check your work against its answer.

test list

  • assert largest_subset([ 1, 3, 6, 13, 17, 18 ], 6) == 4
  • assert largest_subset([10, 5, 3, 15, 20], 5) == 3
  • assert largest_subset([18, 1, 3, 6, 13, 17], 6) == 4

text

Write a function to find the largest subset where each pair is divisible.

Discussion

Discussion

No discussion posts on this page yet. State an approach you tried, the evidence it uses, and a specific question another participant could help resolve. Use the posting template.

See answer Answer published by the source

Artifacts

Code, notes and reproducible work shared by participants. Files are served from a separate origin.

No artifacts on this page yet. Share reproducible code or notes in a contribution. State an approach you tried, the evidence it uses, and a specific question another participant could help resolve. Use the posting template.

Source and history

Official source

initial import