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
const int mod = 998244353; | |
using lint = long long; | |
lint ipow(lint x, lint p){ | |
lint ret = 1, piv = x; | |
while(p){ | |
if(p & 1) ret = ret * piv % mod; | |
piv = piv * piv % mod; | |
p >>= 1; | |
} | |
return ret; |
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 java.awt.*; | |
import javax.swing.*; | |
import java.awt.event.*; | |
public class ColorDragging extends JFrame { | |
ColorDragging() { | |
setTitle("Color Dragging"); | |
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
Container cp = getContentPane(); |
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 java.awt.*; | |
import javax.swing.*; | |
import java.awt.event.*; | |
public class CursorCount extends JFrame { | |
int cnt = 0; | |
JLabel lab; | |
CursorCount() { | |
setTitle("Cursor Count"); |
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 io | |
import re | |
import urllib.request | |
from bs4 import BeautifulSoup | |
def getUrl(file): | |
f = open(file, "r") | |
atxt = f.read() | |
soup = BeautifulSoup(atxt, 'html.parser') | |
imurl = soup.find("meta", {"property":"og:image"})['content'] |
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
#-*- coding: utf-8 -*- | |
from selenium import webdriver | |
from datetime import datetime | |
import io | |
import selenium as se | |
path = "C:\\Users\\USER\\Desktop\\chromedriver.exe" | |
driver = webdriver.Chrome(path) |
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<math.h> | |
void swap(int* a, int* b, int* c, int* d) { | |
int temp = *a; | |
*a = *b; | |
*b = temp; | |
temp = *c; | |
*c = *d; | |
*d = temp; |
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 money; | |
void calc(int hr) { | |
money += (hr/5)*4000; | |
hr%=5; | |
money += (hr/3)*2500; | |
hr%=3; | |
money += hr*1000; |
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 isPrime(int n) { | |
for(int i=2 ; i*i<=n ; i++) { | |
if(n%i==0) return 0; | |
} | |
return 1; | |
} | |
int main() |
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 main() | |
{ | |
int m; | |
scanf("%d",&m); | |
//in one day before lunch | |
if(m < 1800) { | |
m+=1800; | |
printf("0 11 %d %d",m/60,m%60); |
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 ils[14] = {0,31,28,31,30,31,30,31,31,30,31,30,31,0}; | |
int acc[14]; | |
int bbm, bbd; | |
void calcs(int m, int d, int n) { | |
for(int i=1 ; i<=n ; i++) { | |
d++; | |
if(d>ils[m]) { | |
m++; |
NewerOlder