摘要:http://pastebin.com/1CCUfPp3// Victor Padilla (vector9x@gmail.com) - SPOJ ONP import java.io.*;import java.util.*;public class TransformExp { static void dbg(Object...os) { System.err.println(Arrays.deepToString(os)); } static BufferedReader input; static StringTokenizer _stk; static String readln()
阅读全文
文章分类 - 【Sphere Online Judge】
摘要:SPOJ Problem Set (classical)4. Transform the ExpressionProblem code: ONPTransform the algebraic expression with brackets into RPN form (Reverse Polish Notation). Two-argument operators: +, -, *, /, ^ (priority from the lowest to the highest), brackets ( ). Operands: only letters: a,b,...,z. Assume t
阅读全文
摘要:using System;public class Test{ public static void Main() { int n; while ((n = int.Parse(Console.ReadLine()))!=42) Console.WriteLine(n); }}1.不能去掉using System;会报错2.这里不需要namespace,就连public都可以去掉3.最简单格式的命令行程序就是class 类名{ public static void Main() { }}
阅读全文