This file contains hidden or 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 max, mlen, cnt, b, check[10000000]; | |
int ubak(long long int a) { | |
if (a<10000000 && check[a] != 0) | |
return cnt + check[a]; | |
cnt++; | |
if (a == 1) | |
return cnt; |
This file contains hidden or 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 n; | |
void f1(int n) | |
{ | |
int ok = 1; | |
for (int i = 2; i<n; i++) { | |
if (n%i == 0) | |
ok--; | |
} | |
if (ok == 1) |
This file contains hidden or 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 MyClass: | |
myVar = 1 | |
def HelloWorld(self): | |
MyClass.myVar = 2 | |
self.myVar = 3 | |
a = MyClass() | |
print(MyClass.myVar) | |
print(a.myVar) |
This file contains hidden or 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 graph[105][105]; | |
int main() | |
{ | |
int n, m; | |
scanf("%d", &n); | |
scanf("%d", &m); | |
for (int i = 0; i < m; i++) { |
This file contains hidden or 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
from django.conf.urls import include, url | |
from django.contrib import admin | |
from django.conf import settings | |
from django.conf.urls.static import static | |
urlpatterns = [ | |
url(r'^admin/', admin.site.urls), | |
url(r'^bookmark/', include('bookmark.urls', namespace='bookmark')), | |
url(r'^blog/', include('blog.urls', namespace='blog')), | |
] |
This file contains hidden or 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<iostream> | |
#include<algorithm> | |
using namespace std; | |
struct point {int x, y;}; | |
This file contains hidden or 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 serial #Serial imported for Serial communication | |
import time #Required to use delay functions | |
ArduinoSerial = serial.Serial('/dev/cu.usbmodem1421',9600) #Create Serial port object called arduinoSerialData | |
time.sleep(2) #wait for 2 secounds for the communication to get established | |
print (ArduinoSerial.readline()) #read the serial data and print it as line | |
print ("Enter 1 to turn ON LED and 0 to turn OFF LED") | |
This file contains hidden or 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> | |
char inp[100]; | |
char st[100]; | |
int top = 0; | |
void push(char c){ | |
st[top++] = c; | |
} | |
char pop(){ | |
if( top == 0 ) return -1; | |
return st[--top]; |
This file contains hidden or 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> | |
#include <stdlib.h> | |
typedef struct node{ | |
char value; | |
struct node* parent; | |
struct node* left, *right; | |
}node; | |
typedef node* p_node; | |
void inorder(p_node node){ |
This file contains hidden or 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
/* // 1번 | |
#include <stdio.h> | |
int arr[105][105] = {0,}; // 배열 크기는 넉넉하게 0으로 초기화 | |
int main(void) | |
{ | |
int n, m; | |
scanf("%d %d", &n, &m); // 입력 | |