Talk:希顶解经
ColorfulGalaxy在话题“Open source program”中的最新留言:周一20:00
Open source program
This program takes Chat Alphabet letters as input. ColorfulGalaxy(留言) 2024年12月16日 (一) 20:00 (CST)
#include <cstdio> #define lnt long long const char format[]="%lld"; unsigned char c; lnt sum; const lnt nums[256]={ 00000,00000,00000,00000, 00000,00000,00000,00000, 00000,00000,00000,00000, 00000,00000,00000,00000, 00000,00000,00000,00000, 00000,00000,00000,00000, 00000,00000,00000,00000, 00000,00000,00000,00000, 00000,00+00,00000,00000, 00000,00000,00000,00000, 00000,00000,00000,00000, 00000,00000,00000,00000, 00000,80000,30000,60000, 0+400,0+500,20000,0+800, 50000,00000,00000,00000, 00000,00000,00000,00000, 00000,+8000,0+900,00000, 00+20,+7000,0+700,00000, 00+50,00000,00000,00000, 10000,00000,00+60,00000, 00000,00000,00000,00000, 40000,00000,70000,00000, 00000,+9000,00000,00000, 00000,00000,00000,00000, 00000,+4000,00001,+1000, 00+80,+6000,+2000,0+100, 0+300,90000,00005,0+200, 00+70,00003,000+9,+5000, 00002,00006,00+40,00+30, 00+90,+3000,0+600,00004, 00007,000+8,00+10}; int main(){ while((c=getchar())-255){ sum+=nums[c]; sum<0 && fputs("Number overflow",stderr); } printf(format,sum); return 0; }