Looking for an inspiration? Below you will find public programs submitted by other users.

Filter by: All Bash C C# C++ 4.9.2 C++14 Haskell Java Java7 Objective-C Pascal (fpc) Pascal (gpc) Perl PHP Python Python 3 Ruby SQL VB.NET Ada Assembler Assembler AWK (gawk) AWK (mawk) bc Brainf**k C++ 4.3.2 C99 strict CLIPS Clojure COBOL COBOL 85 Common Lisp (clisp) D D (dmd) Erlang F# Factor Falcon Forth Fortran Go Groovy Icon Intercal JavaScript (rhino) JavaScript (spidermonkey) Lua Nemerle Nice Nimrod Node.js Ocaml Octave Oz PARI/GP Perl 6 Pike Prolog (gnu) Prolog (swi) Python (Pypy) R Scala Scheme (chicken) Scheme (guile) Smalltalk Tcl Text Unlambda Whitespace

#Hgn26Q C++14 45 seconds ago
Compilation error
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main() {
  5. long long double p,n;
  6. int k;
  7. while(scanf("%lld%lld",&n,&p)!=EOF) {
  8. k=(static_int)(pow(p,n));
  9. cout<<k<<endl;
#BAiHyg C++14 3 minutes ago
Success
  1. #include <iostream>
  2.  
  3. long double operator"" _mm(long double x) { return x / 1000; }
  4. long double operator"" _m(long double x) { return x; }
  5. long double operator"" _km(long double x) { return x * 1000; }
  6.  
  7. int main()
  8. {
  9. std::cout << 1.0_mm << '\n';
#UMglxd C++14 1 minute ago
Compilation error
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int a,b;
  7. scanf("%d%d",&a&b);
  8. return 0;
  9. }
#DeTJQf C++14 3 minutes ago
Compilation error
  1. #include <iostream>
  2.  
  3. std::string operator"" _deg(double d)
  4. {
  5. return ;
  6. }
  7.  
  8. int main()
  9. {
#kDB6Zw C++14 5 minutes ago
Compilation error
  1. include <iostream>
  2.  
  3. // used as conversion
  4. constexpr double operator"" _deg ( double deg )
  5. {
  6. return deg*3.141592/180;
  7. }
  8.  
#uA68Ko C++14 10 minutes ago
Success
  1. #include <iostream>
  2. #include<sstream>
  3. using namespace std;
  4.  
  5. int main() {
  6. double ding=2.555555,wei=6.541854;
  7. stringstream s;
  8. s.precision(2);
  9. s<<ding<<' '<<wei;
#Dcf43u C++14 12 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int left(int a[],int i,int size)
  5. {
  6. int k=i-1;
  7. while(k>=0)
  8. {
  9. if(a[k]>a[i])
#OMiP5X C++14 6 seconds ago
Compilation
  1. #include<list>
  2. #include<iostream>
  3. #include<string>
  4. using namespace std;
  5. typedef string Elem;
  6.  
  7. //Define structure node with pointers to
  8. //left child,right child and parent node.
  9. struct Node
#YcZhv3 C++14 14 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int left(int a[],int i,int size)
  5. {
  6. int k=i-1;
  7. while(k>=0)
  8. {
  9. if(a[k]>a[i])
#1T2EGD C++14 8 minutes ago
Success
  1. #include <cmath>
  2. #include <cstdio>
  3. #include <vector>
  4. #include <iostream>
  5. #include <algorithm>
  6. using namespace std;
  7.  
  8.  
  9. int main() {
#QjFDyk C++14 16 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. bool obj = "apple" > "baker";
  6. cout << obj;
  7. return 0;
  8. }
#jyLngB C++14 1 minute ago
Success
  1. #include<iostream>
  2.  
  3. using namespace std;
  4. class A
  5. {
  6. public:
  7. int a;int b;
  8. A()
  9. {
#VWVLLg C++14 19 minutes ago
Success
  1. // Calculate the area required for painting a room and the cost
  2. // Language used C++
  3.  
  4. /*
  5. Room is an object whose data members are the 4 walls and the ceiling
  6.   All the 4 walls are themselves an object with data members being their length and breadth
  7. */
  8.  
  9. #include <iostream>
#CRif46 C++14 19 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. bool obj = "apple" < "baker";
  6. cout << obj;
  7. return 0;
  8. }
#oHKNAI C++14 22 minutes ago
Compilation error
  1. #include <iostream>
  2. //using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. std::cout << "a" << endl;
  7. return 0;
  8. }
#ahW01f C++14 22 minutes ago
Compilation error
  1. # include <iostream>
  2. # include <fstream>
  3. # include <map>
  4. # include <string>
  5. # include <cstdlib>
  6. # include <sstream>
  7. using namespace std;
  8.  
  9. #define JAI "Jai"
#PJXg8w C++14 23 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. cout << "a" << endl;
  6. return 0;
  7. }
#v6saeN C++14 23 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. return 0;
  7. }
#pd4VdC C++14 24 minutes ago
Compilation error
  1. #include <iostream>
  2. //using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. std::cout<<"a"<<endl;
  7. return 0;
  8. }
#3aXSRK C++14 2 minutes ago
Time limit exceeded
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. main() {
  5. int i =0;
  6. cout<<(+(+i--))<<endl;
  7. while(+(+i--)!= 0)
  8. i-=i++;
  9. cout<<i;
#yQ2X1K C++14 26 minutes ago
Success
  1. #include<cstdio>
  2. #include<iostream>
  3. #include<algorithm>
  4. using namespace std;
  5. int x,y;
  6. void extended_euclid(int a,int b)
  7. {
  8. if(b==0)
  9. {
#lxwp5L C++14 27 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Test{
  5. private:
  6. int y;
  7. int x;
  8.  
  9. public:
#SWiSI3 C++14 14 minutes ago
Success
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. set<int> s;
  6. for (int i = 0; i < 10; ++i) {
  7. s.insert(2 * i);
  8. cout << 2 * i << ' ';
  9. }
#84PSNF C++14 34 minutes ago
Compilation error
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. double age;
  6.  
  7. cout << "enter your age" << endl;
  8.  
  9. cin >> age;
#IPPlcl C++14 35 minutes ago
Runtime error
  1. #include<iostream>
  2. #include<cstring>
  3. #include<map>
  4. #include<algorithm>
  5. #include<vector>
  6. using namespace std;
  7. long long dp[500001];
  8. int main()
  9. {
#lgHkYM C++14 36 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. cout << "Hello World" << endl;
  7.  
  8. return 0;
  9. }
#iaETB1 C++14 22 minutes ago
Success
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4. using namespace std;
  5.  
  6. class Solution {
  7. public:
  8. int numIslands(vector<vector<char>>& grid) {
  9. int hi = grid.size(), lo = grid[0].size();
#y0seqc C++14 40 minutes ago
Success
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <math.h>
  4. #include <iostream>
  5. #include <set>
  6. #include <algorithm>
  7. #include <vector>
  8.  
  9. using namespace std;
#hpOuhE C++14 46 minutes ago
Compilation error
  1. #include <iostream>
  2. //using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. std::cout<<"aa"<<endl;
  7. return 0;
  8. }
#FFg2AG C++14 43 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int n, NumList[10]={6,4,7,8,9,45,3,12,41,99};
  5. void tukar(int a,int b) //procedure for swap
  6. {
  7. int t;
  8. t = NumList[b];
  9. NumList[b] = NumList[a];