Desafio
Escreva um programa que tenha como entrada um dia de 30 de abril de 1789 a 21 de agosto de 2019 e retorne como saída que foi presidente dos EUA naquele dia.
Notas
Para a lista de presidentes dos EUA , o formato de seus nomes e o período de sua presidência, veja abaixo:
April 30, 1789 - March 4, 1797 George Washington
March 4, 1797 - March 4, 1801 John Adams
March 4, 1801 - March 4, 1809 Thomas Jefferson
March 4, 1809 - March 4, 1817 James Madison
March 4, 1817 - March 4, 1825 James Monroe
March 4, 1825 - March 4, 1829 John Quincy Adams
March 4, 1829 - March 4, 1837 Andrew Jackson
March 4, 1837 - March 4, 1841 Martin Van Buren
March 4, 1841 - April 4, 1841 William Henry Harrison
April 4, 1841 - March 4, 1845 John Tyler
March 4, 1845 - March 4, 1849 James K. Polk
March 4, 1849 - July 9, 1850 Zachary Taylor
July 9, 1850 - March 4, 1853 Millard Fillmore
March 4, 1853 - March 4, 1857 Franklin Pierce
March 4, 1857 - March 4, 1861 James Buchanan
March 4, 1861 - April 15, 1865 Abraham Lincoln
April 15, 1865 - March 4, 1869 Andrew Johnson
March 4, 1869 - March 4, 1877 Ulysses S. Grant
March 4, 1877 - March 4, 1881 Rutherford B. Hayes
March 4, 1881 - September 19, 1881 James A. Garfield
September 19, 1881 - March 4, 1885 Chester A. Arthur
March 4, 1885 - March 4, 1889 Grover Cleveland
March 4, 1889 - March 4, 1893 Benjamin Harrison
March 4, 1893 - March 4, 1897 Grover Cleveland
March 4, 1897 - September 14, 1901 William McKinley
September 14, 1901 - March 4, 1909 Theodore Roosevelt
March 4, 1909 - March 4, 1913 William Howard Taft
March 4, 1913 - March 4, 1921 Woodrow Wilson
March 4, 1921 - August 2, 1923 Warren G. Harding
August 2, 1923 - March 4, 1929 Calvin Coolidge
March 4, 1929 - March 4, 1933 Herbert Hoover
March 4, 1933 - April 12, 1945 Franklin D. Roosevelt
April 12, 1945 - January 20, 1953 Harry S. Truman
January 20, 1953 - January 20, 1961 Dwight D. Eisenhower
January 20, 1961 - November 22, 1963 John F. Kennedy
November 22, 1963 - January 20, 1969 Lyndon B. Johnson
January 20, 1969 - August 9, 1974 Richard Nixon
August 9, 1974 - January 20, 1977 Gerald Ford
January 20, 1977 - January 20, 1981 Jimmy Carter
January 20, 1981 - January 20, 1989 Ronald Reagan
January 20, 1989 - January 20, 1993 George H. W. Bush
January 20, 1993 - January 20, 2001 Bill Clinton
January 20, 2001 - January 20, 2009 George W. Bush
January 20, 2009 - January 20, 2017 Barack Obama
January 20, 2017 - Incumbent Donald Trump
Uma presidência é planejada como o primeiro dia incluído e o último dia excluído. Por exemplo, "4 de março de 1861 - 15 de abril de 1865; Abraham Lincoln" significa que Lincoln foi presidente de 4 de março de 1861 a 14 de abril de 1865.
Este é o código-golfe, o programa mais curto em cada idioma vence.
Exemplo
Entrada: "7 de fevereiro de 1865" Saída: "Abraham Lincoln"
WolframAlpha["president on "<>#]&
Tenho certeza de que o Mathematica puro foi construído em algum lugar, mas até eu encontrar o que é chamado, estou usando W | A.
WolframAlpha["US president on "<>#]&
a saída não esteja correta