1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2025-05-18 12:02:53 +02:00

feat: usage of ESM modules imports (instead of CommonJS) (#14)

This commit is contained in:
Divlo
2022-04-23 18:41:14 +02:00
committed by GitHub
parent c502c17e7c
commit 104c61935a
44 changed files with 6623 additions and 5171 deletions

View File

@ -1,4 +1,7 @@
FROM gcc:11.2.0
COPY ./ ./
RUN gcc -Wall -Wextra -Werror *.c --output=solution
CMD ["./solution"]
FROM gcc:11.3.0
WORKDIR /usr/app
COPY ./ /usr/app
RUN gcc ./*.c* -o solution.exe -Wall -Wextra -Wfloat-equal -Wundef -Werror -std=c17 -pedantic -pedantic-errors
CMD ["./solution.exe"]

View File

@ -1,4 +1,7 @@
FROM gcc:11.2.0
COPY ./ ./
RUN g++ solution.cpp --output=solution
CMD ["./solution"]
FROM gcc:11.3.0
WORKDIR /usr/app
COPY ./ /usr/app
RUN g++ ./*.cpp* -o solution.exe -Wall -Wextra -Wfloat-equal -Wundef -Werror -std=c++17 -pedantic -pedantic-errors
CMD ["./solution.exe"]

View File

@ -1,5 +1,7 @@
FROM mono:6.12.0
WORKDIR /usr/src/app
COPY ./ ./
RUN mcs ./Solution.cs -out:Solution.exe
ENTRYPOINT ["mono", "./Solution.exe"]

View File

@ -1,3 +1,6 @@
FROM dart:2.16.1
COPY ./ ./
FROM dart:2.16.2
WORKDIR /usr/app
COPY ./ /usr/app
CMD ["dart", "run", "solution.dart"]

View File

@ -1,4 +1,7 @@
FROM openjdk:17
COPY ./ ./
WORKDIR /usr/app
COPY ./ /usr/app
RUN javac Solution.java
CMD ["java", "Solution"]

View File

@ -1,3 +1,6 @@
FROM node:16.14.0
COPY ./ ./
FROM node:16.14.2
WORKDIR /usr/app
COPY ./ /usr/app
CMD ["node", "solution.js"]

View File

@ -1,3 +1,6 @@
FROM python:3.10.0
COPY ./ ./
FROM pypy:3.9-7
WORKDIR /usr/app
COPY ./ /usr/app
CMD ["python", "solution.py"]

View File

@ -1,4 +1,7 @@
FROM rust:1.59.0
COPY ./ ./
FROM rust:1.60.0
WORKDIR /usr/app
COPY ./ /usr/app
RUN rustc solution.rs
CMD ["./solution"]

View File

@ -1,8 +1,7 @@
FROM node:16.14.0
FROM node:16.14.2
WORKDIR /usr/app
COPY ./ /usr/app
RUN npm install
RUN npm run build
RUN npm install && npm run build
CMD ["node", "build/solution.js"]

View File

@ -1,9 +1,10 @@
#include <cstdlib>
#include <iostream>
#include <string>
int main() {
for (std::string line; std::getline(std::cin, line);) {
std::cout << "Hello, " + line + "!" << std::endl;
}
return 0;
std::string line;
std::getline(std::cin, line);
std::cout << "Hello, " + line + "!\n";
return EXIT_SUCCESS;
}