- 変数宣言
Dim hoge As 型
- 配列
- 宣言
Dim array() As 型
- 宣言
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.util.LinkedList; | |
| import java.util.StringTokenizer; | |
| public class Main { | |
| public static class Position { |
| struct Pos { | |
| int x, y; | |
| Pos (int _x, int _y) { | |
| x = _x; y = _y; | |
| } | |
| bool operator==(const Pos &other) const { | |
| return x == other.x && y == other.y; | |
| } | |
| }; |
| class Board { | |
| private: | |
| char _board[Y * X]; | |
| public: | |
| char get(Pos pos) { | |
| return _board[pos.y * X + pos.x]; | |
| } | |
| void set(char value, Pos pos) { | |
| _board[pos.y * X + pos.x] = value; |
| # cd -> ls | |
| cdls () | |
| { | |
| \cd "$@" && ls | |
| } | |
| alias cd="cdls" |
| 1 |
| import csv | |
| rows = [ | |
| { | |
| "a": "a", | |
| "b": "b" | |
| }, { | |
| "a": 1, | |
| "b": 2 | |
| }, { |
| import ast | |
| class PythonToGCC(ast.NodeVisitor): | |
| def visit_Num(self, node): | |
| print "LDC {}".format(node.n) | |
| def visit_BinOp(self, node): | |
| self.visit(node.left) | |
| self.visit(node.right) | |
| self.visit(node.op) |
| import sys | |
| import codecs | |
| if len(sys.argv) < 3: | |
| exit(1) | |
| with codecs.open(sys.argv[2], 'w', 'utf-8') as f: | |
| for line in codecs.open(sys.argv[1], 'r', 'cp932'): | |
| f.write(line) |
| class ABBADiv1: | |
| def canObtain(self, initial, target): | |
| def f(initial, rev, target): | |
| if len(target) == len(initial): | |
| return initial == target | |
| if initial in target or rev in target: | |
| if (target[-1] == 'A'): | |
| if f(initial, rev, target[:-1]): | |
| return True |