diff options
Diffstat (limited to 'problems/chainwords/attachments')
-rw-r--r-- | problems/chainwords/attachments/template.c | 21 | ||||
-rw-r--r-- | problems/chainwords/attachments/template.cpp | 21 | ||||
-rw-r--r-- | problems/chainwords/attachments/template.java | 22 | ||||
-rw-r--r-- | problems/chainwords/attachments/template.js | 9 | ||||
-rw-r--r-- | problems/chainwords/attachments/template.py | 11 |
5 files changed, 84 insertions, 0 deletions
diff --git a/problems/chainwords/attachments/template.c b/problems/chainwords/attachments/template.c new file mode 100644 index 0000000..e933710 --- /dev/null +++ b/problems/chainwords/attachments/template.c @@ -0,0 +1,21 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int N; + scanf("%d", &N); fgetc(stdin); + for (int i = 0; i < N; i++) { + char word[13]; + scanf("%[^\n]", word); fgetc(stdin); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("winner\n"); + + return 0; +} diff --git a/problems/chainwords/attachments/template.cpp b/problems/chainwords/attachments/template.cpp new file mode 100644 index 0000000..b9af1d8 --- /dev/null +++ b/problems/chainwords/attachments/template.cpp @@ -0,0 +1,21 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int n; + cin >> n; cin.ignore(); + for (int i = 0; i < n; i++) { + string word; + getline(cin, word); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "winner" << endl; +} diff --git a/problems/chainwords/attachments/template.java b/problems/chainwords/attachments/template.java new file mode 100644 index 0000000..90891b9 --- /dev/null +++ b/problems/chainwords/attachments/template.java @@ -0,0 +1,22 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int N = in.nextInt(); + if (in.hasNextLine()) { + in.nextLine(); + } + for (int i = 0; i < N; i++) { + String word = in.nextLine(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("winner"); + } +} diff --git a/problems/chainwords/attachments/template.js b/problems/chainwords/attachments/template.js new file mode 100644 index 0000000..a75fedb --- /dev/null +++ b/problems/chainwords/attachments/template.js @@ -0,0 +1,9 @@ +const N = parseInt(readline()); +for (let i = 0; i < N; i++) { + const word = readline(); +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('winner'); diff --git a/problems/chainwords/attachments/template.py b/problems/chainwords/attachments/template.py new file mode 100644 index 0000000..e4374f1 --- /dev/null +++ b/problems/chainwords/attachments/template.py @@ -0,0 +1,11 @@ +import sys +import math + +n = int(input()) +for i in range(n): + word = input() + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("winner") |