This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| AOJ 5 | |
| GCD and LCM (PCK 2003) | |
| AC | |
| */ | |
| import std.stdio; | |
| import std.conv; | |
| import std.string; | |
| import std.algorithm; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| AOJ 7 | |
| Debt Hell(PCK2003) | |
| AC | |
| */ | |
| import std.stdio, | |
| std.math, | |
| std.string, | |
| std.conv; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| AOJ 6 | |
| Reverse Sequence(PCK2003) | |
| AC | |
| */ | |
| import std.string, | |
| std.stdio, | |
| std.algorithm; | |
| void main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| AOJ 8 | |
| Sum of 4 Integers(PCK2003) | |
| AC | |
| これって半分全列挙は使えないの? | |
| */ | |
| import std.stdio, | |
| std.string, | |
| std.conv; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| AOJ 11 | |
| Drawing Lots (PCK2003) | |
| */ | |
| import std.stdio, | |
| std.array, | |
| std.conv, | |
| std.string, | |
| std.algorithm; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| AOJ 13 | |
| Switching Railroad Cars(PCK2003) | |
| AC | |
| """ | |
| stack = list() | |
| while (True): | |
| try: | |
| s = int(input()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =begin | |
| AOJ 25 | |
| Hit and Blow (PCL2003) | |
| AC | |
| =end | |
| loop do | |
| line = gets | |
| if !line then | |
| break | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =begin | |
| AOJ 26 | |
| Dropping Ink(PCK2003) | |
| AC | |
| =end | |
| ary = Array.new(10){ Array.new(10, 0) } | |
| loop do | |
| s = gets | |
| if !s then | |
| break |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =begin | |
| AOJ27 | |
| What day is today? (PCK2004) | |
| AC | |
| =end | |
| wdays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] | |
| loop do | |
| xs = gets.split.map{|v| v.to_i} | |
| if xs[0] == 0 && xs[1] == 0 then break; end | |
| puts wdays[Time.new(2004, xs[0], xs[1]).wday] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =begin | |
| AOJ28 | |
| Mode Value(PCK2004) | |
| AC | |
| =end | |
| a = Array.new(101, 0) | |
| loop do | |
| s = gets | |
| if !s then break; end |