Skip to content

Instantly share code, notes, and snippets.

/*
AOJ 5
GCD and LCM (PCK 2003)
AC
*/
import std.stdio;
import std.conv;
import std.string;
import std.algorithm;
/*
AOJ 7
Debt Hell(PCK2003)
AC
*/
import std.stdio,
std.math,
std.string,
std.conv;
/*
AOJ 6
Reverse Sequence(PCK2003)
AC
*/
import std.string,
std.stdio,
std.algorithm;
void main() {
/*
AOJ 8
Sum of 4 Integers(PCK2003)
AC
これって半分全列挙は使えないの?
*/
import std.stdio,
std.string,
std.conv;
/*
AOJ 11
Drawing Lots (PCK2003)
*/
import std.stdio,
std.array,
std.conv,
std.string,
std.algorithm;
"""
AOJ 13
Switching Railroad Cars(PCK2003)
AC
"""
stack = list()
while (True):
try:
s = int(input())
=begin
AOJ 25
Hit and Blow (PCL2003)
AC
=end
loop do
line = gets
if !line then
break
end
=begin
AOJ 26
Dropping Ink(PCK2003)
AC
=end
ary = Array.new(10){ Array.new(10, 0) }
loop do
s = gets
if !s then
break
=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]
=begin
AOJ28
Mode Value(PCK2004)
AC
=end
a = Array.new(101, 0)
loop do
s = gets
if !s then break; end