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 <stdio.h> | |
int main(void){ | |
printf("Hello World!\n"); //this is a test | |
} |
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 System.IO | |
main = do | |
putStrLn $ show $ sum $ filter judge [1..999] | |
judge a | a `mod` 3 == 0 || a `mod` 5 == 0 = True | |
| otherwise = False |
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 System.IO | |
main = do | |
putStrLn $ show $ sum $ filter even $ takeWhile ((>) 4000000) fib | |
fib = 1:2:[ a+b | (a,b) <- zip fib (tail fib)] |
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 System.IO | |
main = do | |
putStrLn $ show $ last $ filter ((== 0) . (mod 600851475143)) (takeWhile (< (truncate (sqrt 600851475143))) prime) | |
prime = 2:f [3] [3,5..] | |
where f (x:xs) ys = let (ps, qs) = span (< x^2) ys | |
in ps ++ f (xs ++ ps) [z | z <- qs, z `mod` x /= 0] |
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 System.IO | |
main = do | |
putStrLn $ biggest "0" [ show (a*b) | a <- [100..999], b <- [100..999], isPalindromicNum (show (a*b))] | |
isPalindromicNum [] = True | |
isPalindromicNum (_:[]) = True | |
isPalindromicNum (x:xs) | x == last xs = isPalindromicNum (init xs) | |
| otherwise = False |
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 System.IO | |
main = do | |
putStrLn $ show $ foldr lcm 1 [1..20] |
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
javascript:(function(){scroll(0,0);H='http://images.uncyc.org/ja/f/fb/';D=document;D.body.appendChild(B=D.createElement('b'));with(B.style){position='absolute';color='#0F0';fontSize='192px';top=0};S=0;F=Math.floor;R=Math.random;Q=new Image;Q.src=H+'Shiled_bugs.png';L=function(){var X=F(R()*vw);var Y=0;var r=F(R()*9)+3;var V=Z(X,Y);D.body.appendChild(V);var f=function(){if(Y+r<vh){V.style.top=(Y+=r)+'px'}else{V.style.top=vh+'px';V.src=H+'Shiled_bugs.png';setTimeout(function(){V.src=H+'Shiled_bugs.png';V.onclick=function(){D.body.removeChild(V);B.innerHTML=++S}},550);clearInterval(t);}};var t=setInterval(f,40)};Z=function(x){var e=D.createElement('img');e.src=Q.src;with(e.style){position='absolute';left=x+'px';top=0;zIndex='10000000'};return e;};var vw,vh;Q.onload=function(){vw=(self.innerWidth||D.documentElement.clientWidth||D.body.clientWidth)-Q.width;vh=(self.innerHeight||D.documentElement.clientHeight||D.body.clientHeight)-Q.height;setInterval(L,800);Q.onload={}}})() |
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
line = STDIN.gets("\n\n") | |
tabular = line.split("\n") | |
#puts tabular | |
columnNum = tabular[0].split("\t").length | |
#puts columnNum | |
puts "\n\nResult:" | |
puts "\\begin{table}[htbp]\n\t\\caption{***}\n\t\\begin{center}\n\t\\begin{tabular}{#{"|"+"c|"*columnNum}}\\hline" | |
tabular.each do |row| |
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
¥begin{table}[htbp] | |
¥caption{$V_{DS} - I_D$特性} | |
¥begin{center} | |
¥begin{tabular}{|c|c|c||c|c|c|}¥hline | |
$V_{GS}[V]$ & $V_{DS}$[V] & $I_{D}$[mA] & $V_{GS}$[V] & $V_{DS}$[V] & $I_{D}$[mA] ¥¥ ¥hline¥hline | |
-0.2 & 0 & 0.307 & -1 & 0 & 1.02 ¥¥ ¥cline{2-3} ¥cline{5-6} | |
& 1 & 1.84 & & 1 & 1.1 ¥¥ ¥cline{2-3} ¥cline{5-6} | |
& 2 & 2.81 & & 2 & 1.12 ¥¥ ¥cline{2-3} ¥cline{5-6} | |
& 3 & 3 & & 3 & 1.12 ¥¥ ¥cline{2-3} ¥cline{5-6} | |
& 4 & 3.05 & & 4 & 1.12 ¥¥ ¥cline{2-3} ¥cline{5-6} |
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
#!/usr/bin/perl | |
use CGI; | |
use HTML::Entities; | |
$form = CGI->new(); | |
$handle = $form->param("handle"); | |
$speech = $form->param("speech"); | |
print "Content-type: text/html; charset=UTF-8\n\n"; |
OlderNewer