Advertisement
Tailsray

Проклятая хуйня

Dec 1st, 2023 (edited)
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.23 KB | None | 0 0
  1. "My ear" = 48;
  2. "My mouth" = 57;
  3. "My thoughts" = 0;
  4. Cast "My ear" to char; // '0'
  5. Cast "My mouth" to char; // '9'
  6. "My thoughts" -= 1;
  7. "The thought" = 10; // константа, см. ниже
  8. "Reality" = 0; // сумма
  9.  
  10. Read from STDIN to "The world";
  11. While "The world" != null {
  12.   Split "The world" by ' ' to "Your mind";
  13.   "My hands" = "Your mind"[0]; "Your mind".remove(0);
  14.   "Your thoughts" = "My thoughts"; // здесь храним первую цифру
  15.   While "My hands" != undefined {
  16.     If "My hands" >= "My ear" {
  17.       If "My hands" <= "My mouth" { // '0' <= "My hands" <= '9'
  18.         Cast "My hands" to int; // например, '3' => 3
  19.         If "Your thoughts" < 0 {
  20.           "Your thoughts" = "My hands"; // см. коммент выше
  21.         }
  22.  
  23.         "Your hands" = "My hands"; // здесь храним последнюю цифру
  24.       }
  25.     }
  26.  
  27.     "My hands" = "Your mind"[0]; "Your mind".remove(0);
  28.   }
  29.  
  30.   "Your dream" = "The thought" * "Your thoughts"; // 10 * первая цифра
  31.   "Your dream" = "Your dream" + "Your hands"; // += последняя цифра
  32.   "Reality" = "Reality" + "Your dream"; // сумма += число
  33.   Read from STDIN to "The world";
  34. }
  35.  
  36. Print "Reality" to STDOUT;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement