This file contains 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
int factorial(int n); | |
int main(void) | |
{ | |
int a = factorial(4); // a = 4! | |
// | |
// 詳しくはfactorialを参照してもらえるとわかるが、factorial(4)は | |
// factorial(4) | |
// 4 * factorial(3) | |
// 4 * 3 * factorial(2) |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Test | |
{ | |
class Program | |
{ | |
public static LinkedList<T> mergeList<T>(LinkedList<T> lList, LinkedList<T> rList, Comparison<T> cmp) | |
{ |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Diagnostics; | |
using System.Reflection; | |
namespace Test | |
{ | |
class Program |
This file contains 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
#include "mod_img.as" | |
#include "upaint.as" | |
#include "a2d.hsp" | |
#packopt name "pointCreator" | |
randomize | |
crs = 8 | |
scx = 800 |
This file contains 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
import java.io.File; | |
import java.io.FileInputStream; | |
import javax.swing.JFileChooser; | |
public class Program | |
{ | |
public static void main(String[] args) | |
{ | |
JFileChooser filer = new JFileChooser(); |
This file contains 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
import Data.List | |
main = interact $ unwords . (map show) . sort . filter (>=0) . (map read) . words |
This file contains 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
isZoro :: Integer -> Bool | |
isZoro x = and $ map (== s) p where (s:p) = show x | |
main = do | |
x <- readLn | |
putStrLn . show $ isZoro x |
This file contains 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
data Orekyuu = Orekyuu deriving (Read) | |
instance Show Orekyuu where | |
show Orekyuu = "Lolita Complex" | |
main = do | |
putStrLn $ show Orekyuu |
This file contains 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
data AorOther = A | Other deriving (Show, Eq) | |
instance Read AorOther where | |
read x | |
| x == "A" = A | |
| otherwise = Other | |
toString :: AorOther -> String | |
toString x = " Your Input is " ++ show x |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Collections; | |
using System.Linq; | |
namespace Test | |
{ | |
class Program | |
{ | |
public static void Main(string[] args) |
NewerOlder