Advertisement
MaKiPL

Untitled

Aug 1st, 2021 (edited)
1,408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.10 KB | None | 0 0
  1. //========================================C++17 MSBuild [conforming custom main: [int main(int i, char* c) {...};]
  2. //107 initial
  3. while(1){[c](time_t a){cout<<(Sleep((strftime(c,32,"%H:%M:%S dupka\n",localtime(&a)),1000)),c);}(time(0));}
  4.  
  5. //101 - shrinked comma operator, got value from strftime and multiplates by 66- 66.666 * 15 = ~1000; shrinked brackets
  6. while(1)[c](time_t a){cout<<(Sleep(strftime(c,16,"%H:%M:%S dupka\n",localtime(&a))*66),c);}(time(0));
  7.  
  8. //99 - replaced time_t with auto
  9. while(1)[c](auto a){cout<<(Sleep(strftime(c,16,"%H:%M:%S dupka\n",localtime(&a))*66),c);}(time(0));
  10.  
  11. ///============/=/=/=/============Ugly entries (that I'm not proud of)
  12. //93 - too much comma statements
  13. for(time_t a;;Sleep(1000))cout<<(time(&a),strftime(c,16,"%H:%M:%S dupka\n",localtime(&a)),c);
  14.  
  15. ///============/=/=/=/============Wrong or doesn't working
  16. //90 - moved time_t initialization to variable init [time(0) is no more called as it was called only once
  17. for(auto a=time(0);;Sleep(1000))cout<<(strftime(c,16,"%H:%M:%S dupka\n",localtime(&a)),c);
  18.  
  19. //========================================C++17 MSBuild [conforming standard main: [int main(int argc, char* argv[]) {...};]
  20. //101 initial
  21. for(time_t t;;Sleep(1000))cout<<(time(&t),strftime(*argv,16,"%H:%M:%S tekst\n",localtime(&t)),*argv);
  22.  
  23. //99 - moved sleep outside and localtime(time(... is the only one comma operator
  24. //redundancy on argv;
  25. //redundancy on time, but shit I can't do anything
  26. for(time_t t;;cout<<*argv)Sleep(strftime(*argv,16,"%H:%M:%S tekst\n",localtime((time(&t),&t)))<<6);
  27.  
  28. //98 - time_t which is long long, just use shorter type- this so far I found
  29. for(INT64 t;;cout<<*argv)Sleep(strftime(*argv,16,"%H:%M:%S tekst\n",localtime((time(&t),&t)))<<6);
  30.  
  31. //92 - Right, secret parse thing
  32. for(INT64 t;;cout<<*argv)Sleep(strftime(*argv,16,"%T ABCDE%n",localtime((time(&t),&t)))<<6);
  33.  
  34.  
  35. //Current winning:92
  36. // [C++17] [Marcin]
  37. for(INT64 t;;cout<<*argv)Sleep(strftime(*argv,16,"%T ABCDE%n",localtime((time(&t),&t)))<<6);
  38. // [Java] [Norbert] //98
  39. for(;;Thread.sleep(1000))out.println(new SimpleDateFormat("'dupka 'HH:mm:ss").format(new Date()));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement