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 std.stdio; | |
import std.conv; | |
string fizzbuzz(immutable ulong num) | |
{ | |
return (num % 15 == 0)? "FizzBuzz": (num % 3 == 0)? "Fizz": (num % 5 == 0)? "Buzz": num.to!string(); | |
} | |
string[] genfbtable(immutable ulong num) | |
{ |
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 std.stdio; | |
import std.conv; | |
string fizzbuzz(immutable ulong num) | |
{ | |
return (num % 15 == 0)? "FizzBuzz": (num % 3 == 0)? "Fizz": (num % 5 == 0)? "Buzz": num.to!string(); | |
} | |
string genfbtable(immutable ulong num) | |
{ |
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 std.stdio; | |
import std.math; | |
import std.algorithm; | |
import std.string; | |
import std.conv; | |
void main() | |
{ | |
int[] arr; | |
writeln("number of data"); |
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 <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <cmath> | |
using namespace std; | |
int main(void) | |
{ | |
vector<int> vc; | |
int n; |
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> | |
main(void){ | |
char str[] = "Hello, World"; | |
printf("%s\n", &(0[str])); | |
return 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(void){ | |
int i, n, k, sum, max, a[100000]; | |
while(scanf("%d %d", &n, &k), n){ | |
sum = max = 0; | |
for(i = 0; i < n; i++){ | |
scanf("%d", &a[i]); | |
if(i < k) | |
sum+=a[i]; | |
} |
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 <cstdio> | |
#include <cstring> | |
using namespace std; | |
double expr(char*); | |
double term(char*); | |
double elem(char*); | |
double expr(char *a) | |
{ |
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 <iostream> | |
int determinant(int** matrix,int n) | |
{ | |
int ans = 0; | |
if(n == 2) | |
{ | |
ans = matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0]; | |
return ans; |
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<iostream> | |
#include<deque> | |
#include<queue> | |
using namespace std; | |
deque<char> deq; | |
void check(){ | |
//cout << "check" << endl; | |
deque<char> que; |
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<iostream> | |
#include<string> | |
#include<vector> | |
using namespace std; | |
vector<string> arr; | |
bool search(string); | |
int main(void){ | |
int n; | |
string str1, str2; |