This has also been attributed, with variants, to Paul Erdős, who repeated the remark.
More quotes by Stanislaw Ulam
Attribution
Quote text and notes from Wikiquote: Stanislaw Ulam (page history), available under CC BY-SA 4.0. Source quality and labels are our own summary of what Wikiquote records.