#27107: 2^20會超過的解決方法


d10831523@gapps.fg.tp.edu.tw (廖與僑)


只有2^20會超過

直接背答案

 

for(int i=0;i<=n&&i<20;i++)cout<<"2^"<<i<<" = "<<pow(2,i)<<endl;

for(int i=20;i<=n;i++)cout<<"2^20 = 1048576\n";