fork(1) download
  1. using System;
  2. public class Program
  3. {
  4. public static void Main()
  5. {
  6. //0xFFFF00(5050) + 0xFF(100)
  7. int x = 100;
  8. for (; (x & 0xFF) > 0; x= x & 0xFFFF00 | ((x & 0xFF) -1))
  9. {
  10. x = ((x >> 8) + (x & 0xFF)) << 8 | (x & 0xFF);
  11. }
  12. Console.WriteLine(x>>8);
  13. }
  14. }
Success #stdin #stdout 0.04s 37024KB
stdin
Standard input is empty
stdout
5050