[ create a new paste ] login | about

swapnilghorpade

Name: swapnil ghorpade
Email:
Site/Blog: http://dap82.blogspot.com
Location: nashik,maharashtra,india
Default language: C
Favorite languages: c
About: I am working as a lecturer in a engg. college.

Saved pastes by swapnilghorpade:

Python, pasted on Mar 4:
1
2
3
4
5
#sieve of euler
s=[]
t=[]
for i in xrange(30):
    s.append(i+2)
...
view (20 lines, 2 lines of output)
Python, pasted on Feb 21:
1
2
3
4
5
s=str(raw_input('Enter something'))
set1=s.split()
list1=[]
rev=[]
s4=''
...
view (13 lines, 4 lines of output)
Python, pasted on Jan 7:
1
2
3
4
5
def isprime(n):
    n = abs(int(n))
    if n < 2:
        return False
    if n == 2: 
...
view (49 lines, 4 lines of output)
Python, pasted on Jan 1:
1
2
3
4
5
import math
import random
while(1):
    try:
        a=random.randrange(0,10)
...
view (23 lines, 2 lines of output)
Python, pasted on Jan 1:
1
2
3
4
5
import math
while(1):
    
    s=str(raw_input('>>'))
    try:
...
view (8 lines, 4 lines of output)
Python, pasted on Dec 15:
1
2
3
4
5
#Christian Goldbach (1690-1764) was a
#Prussian mathematician and contemporary of Euler.
#One of the most famous unproven conjectures in number theory is
#known as Goldbach’s Conjecture, which states that every even number
#greater than two is the sum of two prime numbers;
...
view (43 lines, 2 lines of output)
C, pasted on Dec 15:
1
2
3
4
/*Longest Duplicated Substring
December 14, 2010

In a previous exercise, we looked at the problem of finding the longest palindrome in a string. In todays exercise, we look at a similar problem, finding the longest duplicated substring in a string.
...
view (72 lines, 2 lines of output)
C, pasted on Dec 14:
1
2
3
4
5
//Divisors And totatives
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int IsPrime(int num)
...
view (62 lines, 1 line of output)
Python, pasted on Dec 1:
1
2
3
4
5
import random
import math

count_inside = 0
for count in range(0, 10000):
...
view (9 lines, 1 line of output)
C, pasted on Nov 25:
1
2
3
4
5
/* Newton's Method for Sqaure root*/
#include <stdio.h>
int main()
{
	double n,i,t;
...
view (22 lines, 4 lines of output)