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 time,random | |
items = [chr(i) for i in range(0x30a1, 0x30ff + 1)] # katakana | |
for i in range(1,11): # spaces and numbers | |
items.append(str(i)) | |
items.append(" "*i) | |
def rain(row,column): # rows,columns |
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
find . -print |
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() | |
{ | |
int num; | |
scanf("%d",&num); | |
int range = num; | |
int spaces = num * 2 ; // for spaces | |
int i,count=0,val=1,val_range=1; | |
while(range>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
#include<stdio.h> | |
int main() | |
{ | |
int num,i; | |
scanf("%d",&num); | |
int range = num , val = num ,val_range = num; | |
while(range>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
#include<stdio.h> | |
int main() | |
{ | |
int num; | |
scanf("%d",&num); | |
int res , val_11 , val_10 ,i; | |
if(num%11 ==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
aa |
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
def find_sum(a, b): | |
res = 0 | |
if( a < b ): | |
for item in range(a, b+1): | |
res += item | |
else: | |
for item in range(b, a+1): | |
res += item | |
return res |
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
class Node: | |
def __init__(self, data): | |
self.item = data | |
self.nref = None | |
self.pref = None |
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
nums = input().split(",") | |
total_elem = len(nums) | |
output_nums = list() | |
while total_elem: | |
ouput_nums.append(nums[total_elem-1]) | |
total_elem -= 1 | |
print(output_nums) |
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
public class ReverseNum{ | |
public static void main(String []args){ | |
int arr[] = {1, 2, 3, 4, 5, 6}; | |
int output_array[]=new int[6]; | |
for (int itr=0, ctr=5; ctr >=0; ctr--, itr++){ | |
output_array[itr] = arr[ctr]; | |
} | |
for(int itr=0; itr<6; itr++){ | |
System.out.println(output_array[itr]); |
OlderNewer