fork(2) download
  1. #include <iostream>
  2.  
  3. void foo1(std::string s)
  4. {
  5. uint64_t a[]={0x1C22414141221C,0x3E0808080A0C08,0x7F01013E40413E,0x3E41403E40413E,0x20207F21212101,0x3E41403F01017F,0x3E41413F01413E,0x404040810217F,0x3E41413E41413E,0x3E41407E41413E};
  6.  
  7. for(int i=0;i<7;++i,printf("\n"))
  8. for(int c:s)
  9. for(int I=0;I<8;++I)
  10. putchar(1&a[c-48]>>8*i+I?'#':' ');
  11. }
  12.  
  13. void foo2(std::string s)
  14. {
  15. uint64_t a[]={0x1C22414141221C,0x3E0808080A0C08,0x7F01013E40413E,0x3E41403E40413E,0x20207F21212101,0x3E41403F01017F,0x3E41413F01413E,0x404040810217F,0x3E41413E41413E,0x3E41407E41413E};for(int i=0;i<7;++i,printf("\n"))for(int c:s)for(int I=0;I<8;++I)putchar(1&a[c-48]>>8*i+I?'#':' ');
  16. }
  17.  
  18. int main() {
  19. foo1("0123456789");
  20. std::cout<<std::endl<<std::endl<<std::endl<<std::endl;
  21. foo2("0123456789");
  22. return 0;
  23. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
  ###      #     #####   #####  #       #######  #####  #######  #####   #####  
 #   #    ##    #     # #     # #    #  #       #     # #    #  #     # #     # 
#     #  # #          #       # #    #  #       #           #   #     # #     # 
#     #    #     #####   #####  #    #  ######  ######     #     #####   ###### 
#     #    #    #             # #######       # #     #   #     #     #       # 
 #   #     #    #       #     #      #  #     # #     #   #     #     # #     # 
  ###    #####  #######  #####       #   #####   #####    #      #####   #####  




  ###      #     #####   #####  #       #######  #####  #######  #####   #####  
 #   #    ##    #     # #     # #    #  #       #     # #    #  #     # #     # 
#     #  # #          #       # #    #  #       #           #   #     # #     # 
#     #    #     #####   #####  #    #  ######  ######     #     #####   ###### 
#     #    #    #             # #######       # #     #   #     #     #       # 
 #   #     #    #       #     #      #  #     # #     #   #     #     # #     # 
  ###    #####  #######  #####       #   #####   #####    #      #####   #####