Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
/** * Created by entropy on 4/19/2017. */ import java.util.Scanner; public class stronghold { public static void main(String[] args) { Scanner scanner = new Scanner (System.in); int n = Integer.parseInt(scanner.nextLine()); if (n>4){ String top = "/"+repeatString("^", n/2)+"\\"+repeatString("_", n/2)+"/"+repeatString("^", n/2)+"\\"; System.out.println(top);} else { String top = "/"+repeatString("^", n/2)+"\\"+"/"+repeatString("^", n/2)+"\\"; System.out.println(top);} if (n>4) { for (int i = 0; i < n - 3; i++) { String middle = "|" + repeatString(" ", 2 * n - 2) + ("|"); System.out.println(middle); } } else {for (int i = 0; i < n - 2; i++) { String middle = "|" + repeatString(" ", 2 * n - 2) + ("|"); System.out.println(middle); } } if (n>4){ String topBottom ="|"+repeatString(" ",n/2+1)+repeatString("_", n/2)+repeatString(" ", n/2+1)+"|"; System.out.println(topBottom); String bottom = "\\"+repeatString("_", n/2)+"/"+repeatString(" ", n/2)+"\\"+repeatString("_", n/2)+"/"; System.out.println(bottom);} else { String bottom = "\\"+repeatString("_", n/2)+"/"+"\\"+repeatString("_", n/2)+"/"; System.out.println(bottom);} } public static String repeatString (String str, int count) { StringBuilder sb = new StringBuilder(); for (int i = 0; i
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)