Process Class (System.Diagnostics)

import sys

def hanoi(n, a, b, c):
if n == 1:
print('%c --> %c' % (a, c))
else:
hanoi(n-1, a, c, b)
print('%c --> %c' % (a, c))
hanoi(n-1, b, a, c) if __name__ == "__main__":
n = int(sys.stdin.readline())
hanoi(n, 'A', 'B', 'C')
using System.Diagnostics;

namespace Hanoi
{
class Program
{
static void Main(string[] args)
{
Process process = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "python",
Arguments = "hanoi.py",
UseShellExecute = false
}
};
process.Start();
process.WaitForExit();
}
}
}
上一篇:Taxi Trip Time Winners' Interview: 3rd place, BlueTaxi


下一篇:CSS media queries