Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

The modulo parity party – codegolf.stackexchange.com

You are given an array A of n strictly positive integers, with n ≥ 2. Your task is to map each entry Ai to: 1 if Aj mod Ai is odd for each j such that 1 ≤ j ≤ n and j ≠ i 2 if Aj mod Ai is even for ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot



This post first appeared on ONLINE WEB TRICKS, please read the originial post: here

Share the post

The modulo parity party – codegolf.stackexchange.com

×

Subscribe to Online Web Tricks

Get updates delivered right to your inbox!

Thank you for your subscription

×