buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { int i, num, i_max, i_min, i_sum; int *pdata; scanf("%d", &num); pdata = (int *)malloc(sizeof(int) * num); for (i = 0; i < num; i++) { scanf("%d", &pdata[i]); } for (i = 0, i_max = i_min = pdata[0], i_sum = 0; i < num; i++) ...
#include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { int i, num, i_max, i_min; double i_sum; int *pdata; scanf("%d", &num); pdata = (int *)malloc(sizeof(int) * num); for (i = 0; i < num; i++) { scanf("%d", &pdata[i]); } for (i = 0, i_max = i_min = pdata[0], i_sum = 0; i < n...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
176
#include <stdio.h> int main() { int a; while (scanf("%d", &a) != EOF) { long long int max = 0, min = 0, sum = 0, b[1000] = {0}; scanf("%lld", &b[0]); sum = max = min = b[0]; int i; for (i = 1; i < a; i++) { scanf("%lld", &b[i]); if (min > b[i]) { min = b[i]; } if ...
#include <stdio.h> int main() { int a; while (scanf("%d", &a) != EOF) { long long int max = 0, min = 0, sum = 0, b[1000000] = {0}; scanf("%lld", &b[0]); sum = max = min = b[0]; int i; for (i = 1; i < a; i++) { scanf("%lld", &b[i]); if (min > b[i]) { min = b[i]; } ...
[["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13]]
0
166
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str; int n = 0; String[] arr; int[] array; int min = 0; int max = ...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str; int n = 0; String[] arr; int[] array; int min = 0; int max = ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
291
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int t = sc.nextInt(); int max = t; int min = t; int sum = t; for (int i = 1; i < n; i++) { t = sc.nextInt(); if (t > max) ma...
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); long n = sc.nextInt(); long t = sc.nextInt(); long max = t; long min = t; long sum = t; for (long i = 1; i < n; i++) { t = sc.nextInt(); if (t > max) ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 7, 502, 503, 39, 506, 0, 507], ["+", 8, 196, 0, 7, 502, 503, 39, 506, 0, 96]]
3
139
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n, i; long min, max; int sum = 0; n = sc.nextInt(); long[] a = new long[n]; for (i = 0; i < a.length; i++) { a[i] = sc.nextLong(); sum += a[i]; }...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n, i; long min, max; long sum = 0; n = sc.nextInt(); long[] a = new long[n]; for (i = 0; i < a.length; i++) { a[i] = sc.nextLong(); sum += a[i]; ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 195, 8, 196, 0, 7, 502, 11, 12, 499], ["+", 0, 195, 8, 196, 0, 7, 502, 11, 12, 499]]
3
190
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int sum = 0; int a = sc.nextInt(); int[] c = new int[10000]; for (int i = 0; i < a; i++) { c[i] = sc.nextInt(); } int max = c[0]; int min = c[0]; for...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long sum = 0; int a = sc.nextInt(); int[] c = new int[10000]; for (int i = 0; i < a; i++) { c[i] = sc.nextInt(); } int max = c[0]; int min = c[0]; fo...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
181
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a, b, i, total = 0, max = 0, min = 0; a = sc.nextInt(); for (i = 0; i < a; i++) { b = sc.nextInt(); if (i == 0) { max = b; min = b; } ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long a, b, i, total = 0, max = 0, min = 0; a = sc.nextInt(); for (i = 0; i < a; i++) { b = sc.nextInt(); if (i == 0) { max = b; min = b; } ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
146
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int asa[] = new int[x]; int sum = 0; for (int i = 0; i < x; i++) { asa[i] = sc.nextInt(); sum += asa[i]; } ...
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int asa[] = new int[x]; long sum = 0; for (int i = 0; i < x; i++) { asa[i] = sc.nextInt(); sum += asa[i]; } ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
137
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int k = 0; int max = -1000001; int min = 1000001; for (int i = 1; i <= a; i++) { int b = sc.nextInt(); if (b > max) { max = b; ...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); long k = 0; int max = -1000001; int min = 1000001; for (int i = 1; i <= a; i++) { int b = sc.nextInt(); if (b > max) { max = b; ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
135
import java.util.Scanner; public class Main { static int min(int[] a) { int minValue = a[0]; for (int i = 1; i < a.length; i++) { if (a[i] < minValue) { minValue = a[i]; } } return minValue; } static int max(int[] a) { int maxValue = a[0]; for (int i = 1; i < a.lengt...
import java.util.Scanner; public class Main { static long min(int[] a) { long minValue = a[0]; for (int i = 1; i < a.length; i++) { if (a[i] < minValue) { minValue = a[i]; } } return minValue; } static long max(int[] a) { long maxValue = a[0]; for (int i = 1; i < a.l...
[["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96], ["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
297
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int i = scan.nextInt(); int max = -1000000, min = 1000000, sum = 0; for (int j = 0; j < i; j++) { int x = scan.nextInt(); sum += x; if (x > max) max = x; ...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int i = scan.nextInt(); long max = -1000000, min = 1000000, sum = 0; for (int j = 0; j < i; j++) { long x = scan.nextLong(); sum += x; if (x > max) max = ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 7, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 7, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22]]
3
127
import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int a; int min = 1000000; int max = -1000000; int sum = 0; int f = sc.nextInt(); for (; sc.hasNext();) { a = sc...
import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int a; int min = 1000000; int max = -1000000; long sum = 0; int f = sc.nextInt(); for (; sc.hasNext();) { a = s...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
133
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int a[] = new int[n]; int sum = 0; for (int i = 0; i < n; i++) { a[i] = in.nextInt(); sum = sum + a[i]; } ...
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int a[] = new int[n]; long sum = 0; for (int i = 0; i < n; i++) { a[i] = in.nextInt(); sum = sum + a[i]; } ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
149
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { try { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(input.readLine()); String[] line = input.readLine(...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { try { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(input.readLine()); String[] line = input.readLine(...
[["-", 0, 246, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 246, 8, 196, 0, 503, 39, 506, 0, 96]]
3
216
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { try { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(input.readLine()); String[] line = input.readLine(...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { try { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(input.readLine()); String[] line = input.readLine(...
[["-", 0, 246, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 246, 8, 196, 0, 503, 39, 506, 0, 96]]
3
207
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.NoSuchElementException; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { try { InputStreamReader isr = new InputStreamReader(System.in); Buffere...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.NoSuchElementException; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { try { InputStreamReader isr = new InputStreamReader(System.in); Buffere...
[["-", 0, 57, 64, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 57, 64, 196, 0, 503, 39, 506, 0, 96]]
3
281
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int max = -1000000, min = 1000000, get, sum = 0; int i = sc.nextInt(); for (; i > 0; i--) { get = sc.nextInt(); max = Math.max(max, get); min = Math.min(min, get); su...
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int max = -1000000, min = 1000000, get = 0; long sum = 0; int i = sc.nextInt(); for (; i > 0; i--) { get = sc.nextInt(); max = Math.max(max, get); min = Math.min(min, g...
[["-", 8, 498, 0, 195, 8, 196, 0, 503, 0, 21], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 0, 32], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 8, 498, 0, 195, 8, 196, 0, 503, 0, 35], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
126
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int a[] = new int[n]; int sum = 0; for (int i = 0; i < a.length; i++) { a[i] = scan.nextInt(); sum += a[i];...
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int a[] = new int[n]; long sum = 0L; for (int i = 0; i < a.length; i++) { a[i] = scan.nextInt(); sum += a[i...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499]]
3
145
import java.io.*; import java.util.*; class Main { static PrintStream out = System.out; static Scanner in = new Scanner(System.in); public static void main(String[] args) { int n = in.nextInt(); int a = in.nextInt(); int min = a, max = a, sum = a; for (int i = 1; i < n; i++) { a = in.nextI...
import java.io.*; import java.util.*; class Main { static PrintStream out = System.out; static Scanner in = new Scanner(System.in); public static void main(String[] args) { int n = in.nextInt(); int a = in.nextInt(); long min = a, max = a, sum = a; for (int i = 1; i < n; i++) { a = in.next...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
151
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int a; int max = sc.nextInt(); int min = max; int g = max; for (int i = 1; i < n; i++) { a = sc.nextInt(); g = g + a; if (...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int a; int max = sc.nextInt(); int min = max; long g = max; for (int i = 1; i < n; i++) { a = sc.nextInt(); g = g + a; if ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
137
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int max = -1000000; int min = 1000000; int total = 0; for (int i = 0; i < n; i++) { int temp = sc.nextInt(); if (temp > max) { max ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int max = -1000000; int min = 1000000; long total = 0; for (int i = 0; i < n; i++) { int temp = sc.nextInt(); if (temp > max) { max...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
131
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int N = stdIn.nextInt(); int y = stdIn.nextInt(); int min = y; int max = y; int sum = y; for (int i = 1; i < N; i++) { int x = stdIn.nextInt(); su...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int N = stdIn.nextInt(); int y = stdIn.nextInt(); int min = y; int max = y; long sum = y; for (int i = 1; i < N; i++) { int x = stdIn.nextInt(); s...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
143
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int[] datas = new int[Integer.parseInt(reader.rea...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int[] datas = new int[Integer.parseInt(reader.rea...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
189
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(), max = -10001, min = 10001, non; long sum = 0; for (int a = 1; a <= n; a++) { non = sc.nextInt(); if (non >= max) { max = non; } ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(), max = -1000001, min = 1000001, non; long sum = 0; for (int a = 1; a <= n; a++) { non = sc.nextInt(); if (non >= max) { max = non; ...
[["-", 8, 196, 0, 503, 49, 200, 51, 91, 439, 499], ["+", 8, 196, 0, 503, 49, 200, 51, 91, 439, 499], ["-", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499]]
3
133
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int max = Integer.MIN_VALUE; int min = Integer.MAX_VALUE; int b = 0; for (int i = 1; i <= n; i++) { int a = sc.nextInt(); b = b + a; ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int max = Integer.MIN_VALUE; int min = Integer.MAX_VALUE; long b = 0; for (int i = 1; i <= n; i++) { int a = sc.nextInt(); b = b + a; ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
139
import java.util.Scanner; public class Main { public static void main(String[] args) { int max = Integer.MIN_VALUE; int min = Integer.MAX_VALUE; int sum = 0; Scanner x = new Scanner(System.in); int n = x.nextInt(); for (int i = 0; i < n; i++) { int a = x.nextInt(); sum = sum + a;...
import java.util.Scanner; public class Main { public static void main(String[] args) { int max = Integer.MIN_VALUE; int min = Integer.MAX_VALUE; long sum = 0; Scanner x = new Scanner(System.in); int n = x.nextInt(); for (int i = 0; i < n; i++) { int a = x.nextInt(); sum = sum + a...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
139
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner i = new Scanner(System.in); int n = i.nextInt(); int[] a = new int[n + 1]; for (int s = 0; s < n; s++) { a[s] = i.nextInt(); } int min = Integer.MAX_VALUE; int max = Integer.MIN_VALUE; ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner i = new Scanner(System.in); int n = i.nextInt(); int[] a = new int[n + 1]; for (int s = 0; s < n; s++) { a[s] = i.nextInt(); } int min = Integer.MAX_VALUE; int max = Integer.MIN_VALUE; ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
183
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String args[]) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int num = Integer.parseInt(reader.readLine()); ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String args[]) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int num = Integer.parseInt(reader.readLine()); ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 492, 3, 4, 0, 16, 12, 492, 500, 22], ["+", 0, 492, 3, 4, 0, 16, 12, 492, 500, 22]]
3
217
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] nums = new int[n]; for (int i = 0; i < n; i++) { nums[i] = scan.nextInt(); } scan.close(); int max = nums[0]; int min = nums[...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] nums = new int[n]; for (int i = 0; i < n; i++) { nums[i] = scan.nextInt(); } scan.close(); long max = nums[0]; long min = num...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
190
import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; public class Main { private static Scanner scan; public static void main(String[] args) { scan = new Scanner(System.in); int n = scan.nextInt(); ArrayList<Integer> list = new ArrayList<Integer>(); int input = 0; ...
import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; public class Main { private static Scanner scan; public static void main(String[] args) { scan = new Scanner(System.in); int n = scan.nextInt(); ArrayList<Long> list = new ArrayList<Long>(); long input = 0; lon...
[["-", 8, 196, 0, 503, 39, 513, 0, 237, 0, 78], ["+", 8, 196, 0, 503, 39, 513, 0, 237, 0, 78], ["-", 49, 200, 51, 230, 39, 513, 0, 237, 0, 78], ["+", 49, 200, 51, 230, 39, 513, 0, 237, 0, 78], ["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 1, 0, 11, 12, 4...
3
161
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdin = new Scanner(System.in); int n = stdin.nextInt(); int min = 0; int max = 0; int sum = 0; for (int i = 0; i < n; i++) { int m = stdin.nextInt(); sum += m; if (i == 0) { ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdin = new Scanner(System.in); int n = stdin.nextInt(); int min = 0; int max = 0; long sum = 0; for (int i = 0; i < n; i++) { int m = stdin.nextInt(); sum += m; if (i == 0) { ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
146
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int min = 1000000; int max = -1000000; int sum = 0; for (int i = 0; i < n; i++) { int x = scanner.nextInt(); if (x < min) ...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int min = 1000000; int max = -1000000; long sum = 0; for (int i = 0; i < n; i++) { int x = scanner.nextInt(); if (x < min) ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
135
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int[] b = new int[a]; int c = Integer.MAX_VALUE; int d = Integer.MIN_VALUE; int e = 0; for (int i = 0; i < a; i++) { int f = s...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int[] b = new int[a]; int c = Integer.MAX_VALUE; int d = Integer.MIN_VALUE; long e = 0; for (int i = 0; i < a; i++) { int f =...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
147
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); final int n = sc.nextInt(); int min = Integer.MAX_VALUE; int max = Integer.MIN_VALUE; int sum = 0; for (int i = 0; i < n; i++) { final ...
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); final long n = sc.nextLong(); long min = Integer.MAX_VALUE; long max = Integer.MIN_VALUE; long sum = 0; for (int i = 0; i < n; i++) { f...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22]]
3
144
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader buf = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(buf.readLine()); String[] str ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader buf = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(buf.readLine()); String[] str ...
[["-", 8, 196, 0, 503, 49, 200, 51, 509, 119, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 509, 119, 22]]
3
184
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int sum = 0; int[] nums = new int[a]; for (int i = 0; i < a; i++) { nums[i] = sc.nextInt(); sum += nums[i]; } int max = nums[0];...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); long sum = 0; int[] nums = new int[a]; for (int i = 0; i < a; i++) { nums[i] = sc.nextInt(); sum += nums[i]; } int max = nums[0]...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
162
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n, num, min, max, sum = 0; n = sc.nextInt(); num = sc.nextInt(); min = num; max = num; sum += num; for (int i = 1; i < n; i++) { num = sc.nextInt(); mi...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n, num, min, max; long sum = 0; n = sc.nextInt(); num = sc.nextInt(); min = num; max = num; sum += num; for (int i = 1; i < n; i++) { num = sc.nextInt();...
[["-", 8, 498, 0, 195, 8, 196, 0, 503, 0, 21], ["+", 8, 498, 0, 195, 8, 196, 0, 503, 0, 35], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
147
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int amount = scan.nextInt(); int[] num = new int[amount]; for (int i = 0; i < amount; i++) { num[i] = scan.nextInt(); } // Calculate Max int max = num[0]; for ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int amount = scan.nextInt(); long[] num = new long[amount]; for (int i = 0; i < amount; i++) { num[i] = scan.nextLong(); } // Calculate Max long max = num[0]; ...
[["-", 8, 196, 0, 503, 39, 224, 468, 506, 0, 507], ["+", 8, 196, 0, 503, 39, 224, 468, 506, 0, 96], ["-", 0, 503, 49, 200, 51, 227, 39, 506, 0, 507], ["+", 0, 503, 49, 200, 51, 227, 39, 506, 0, 96], ["-", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22], ["-", 0, 195, 8, 196, 0, 503,...
3
214
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner kb = new Scanner(System.in); double a[] = new double[10001]; double min = -1000000, max = -1000000, sum = 0; int i = 0; int n = kb.nextInt(); while (0 < n--) { a[i] = kb.nextDouble(); sum += a...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner kb = new Scanner(System.in); double a[] = new double[10001]; double min = 1000000, max = -1000000, sum = 0; int i = 0; int n = kb.nextInt(); while (0 < n--) { a[i] = kb.nextDouble(); sum += a[...
[["-", 8, 196, 0, 503, 49, 200, 51, 91, 17, 33]]
3
155
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int max, min, sum = 0; int n = s.nextInt(); int[] data = new int[n]; for (int i = 0; i < n; i++) { data[i] = s.nextInt(); } max = data[0]; min = data[0]; ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); long max, min, sum = 0; int n = s.nextInt(); long[] data = new long[n]; for (int i = 0; i < n; i++) { data[i] = s.nextInt(); } max = data[0]; min = data[0...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 503, 39, 224, 468, 506, 0, 507], ["+", 8, 196, 0, 503, 39, 224, 468, 506, 0, 96], ["-", 0, 503, 49, 200, 51, 227, 39, 506, 0, 507], ["+", 0, 503, 49, 200, 51, 227, 39, 506, 0, 96], ["-", 0, 195, 8, 196, 0, 1...
3
181
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int min = 0, max = 0, sum = 0; for (int i = 0; i < N; i++) { int a = sc.nextInt(); sum += a; if (i == 0) { min = a; max ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); long min = 0, max = 0, sum = 0; for (int i = 0; i < N; i++) { long a = sc.nextInt(); sum += a; if (i == 0) { min = a; ma...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 7, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 7, 8, 196, 0, 503, 39, 506, 0, 96]]
3
143
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String[] inputNu...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String[] inputNu...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
197
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str; String[] arrStr; try { // 1 line str = br.read...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str; String[] arrStr; try { // 1 line str = br.read...
[["-", 0, 246, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 246, 8, 196, 0, 503, 39, 506, 0, 96]]
3
228
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner o = new Scanner(System.in); int n = o.nextInt(); int a = o.nextInt(); int max = a; int min = a; int sum = 0; for (int i = 0; i < n; i++) { // System.out.println(a); if (max < a) { ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner o = new Scanner(System.in); int n = o.nextInt(); int a = o.nextInt(); int max = a; int min = a; long sum = 0; for (int i = 0; i < n; i++) { // System.out.println(a); if (max < a) { ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
157
import java.io.*; import java.util.*; public class Main { void run() { int N = readInt(); int minVal = Integer.MAX_VALUE; int maxVal = Integer.MIN_VALUE; int sumVal = 0; for (int i = 0; i < N; i++) { int a = readInt(); minVal = Math.min(minVal, a); maxVal = Math.max(maxVal, a); ...
import java.io.*; import java.util.*; public class Main { void run() { int N = readInt(); int minVal = Integer.MAX_VALUE; int maxVal = Integer.MIN_VALUE; long sumVal = 0; for (int i = 0; i < N; i++) { int a = readInt(); minVal = Math.min(minVal, a); maxVal = Math.max(maxVal, a);...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
294
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String line[] = b...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String line[] = b...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 0, 24], ["+", 0, 1, 0, 11, 12, 74, 39, 506, 0, 96], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 0, 25]]
3
250
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { // TODO ????????????????????????????????????????????? BufferedReader breader = new Buffered...
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { // TODO ????????????????????????????????????????????? BufferedReader breader = new Buffered...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
205
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.text.DecimalFormat; import java.util.ArrayList; class Main { public static void main(String[] args) throws IOException { DecimalFormat df1 = new DecimalFormat("0.000000"); BufferedReader in = new Buffered...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.text.DecimalFormat; import java.util.ArrayList; class Main { public static void main(String[] args) throws IOException { DecimalFormat df1 = new DecimalFormat("0.000000"); BufferedReader in = new Buffered...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
259
import java.io.*; import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; class Main { public static void main(String[] args) throws IOException { Scanner in = new Scanner(System.in); int n = in.nextInt(); long sum_ = 0, max_ = 0, min_ = 10000000; for (int i = 0; i < n; i...
import java.io.*; import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; class Main { public static void main(String[] args) throws IOException { Scanner in = new Scanner(System.in); int n = in.nextInt(); long sum_ = 0, max_ = -10000000, min_ = 10000000; for (int i = 0; ...
[["-", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 503, 49, 200, 51, 91, 17, 33], ["+", 8, 196, 0, 503, 49, 200, 51, 91, 439, 499]]
3
167
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] strArray; int sum = 0; int num, max, min; int n = Integer.parseInt...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] strArray; long sum = 0; int num, max, min; int n = Integer.parseIn...
[["-", 0, 246, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 246, 8, 196, 0, 503, 39, 506, 0, 96]]
3
220
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int a[] = new int[n]; int tot = 0; for (int b = 0; b < n; b++) { a[b] = scan.nextInt(); tot = tot + a[b]; } int max = a[0]; ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int a[] = new int[n]; long tot = 0; for (int b = 0; b < n; b++) { a[b] = scan.nextInt(); tot = tot + a[b]; } int max = a[0]; ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
185
// Computation - Min, Max and Sum import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(in.rea...
// Computation - Min, Max and Sum import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(in.read...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
185
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.*; public class Main { static InputStream is; static PrintWriter out; static String INPUT = ""; final int INF = Integer.MAX_VALUE; final int MIN = Integer.MIN_VALUE; ...
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.*; public class Main { static InputStream is; static PrintWriter out; static String INPUT = ""; final int INF = Integer.MAX_VALUE; final int MIN = Integer.MIN_VALUE; ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
1,077
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int[] a = new int[n]; int sum = 0; for (int i = 0; i < n; i++) { a[i] = Integer.parseInt(sc.next()); sum += a[i]; } int ma...
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int[] a = new int[n]; long sum = 0; for (int i = 0; i < n; i++) { a[i] = Integer.parseInt(sc.next()); sum += a[i]; } int max = a[...
[["-", 36, 36, 0, 493, 0, 235, 0, 494, 0, 259], ["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 95], ["-", 0, 1, 0, 492, 3, 4, 0, 74, 0, 24], ["-", 0, 492, 3, 4, 0, 74, 39, 506, 0, 96], ["-", 0, 1, 0, 492, 3, 4, 0, 74, 0, 25]]
3
193
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String first = br.readLine(); int[] array = new int[Intege...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String first = br.readLine(); int[] array = new int[Intege...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
233
import java.io.*; class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); String[] ary = br.readLine().split(" "); int min = 1000000; int max = -1000000; long sum ...
import java.io.*; class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); String[] ary = br.readLine().split(" "); int min = 1000000; int max = -1000000; long sum ...
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]]
3
162
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int count = scan.nextInt(); int min = 1000000; int max = 0; long sum = 0; int num = 0; for (int i = 0; i < count; i++) { num = scan.nextInt(); sum = su...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int count = scan.nextInt(); int min = 1000000; int max = -1000000; long sum = 0; int num = 0; for (int i = 0; i < count; i++) { num = scan.nextInt(); s...
[["-", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 503, 49, 200, 51, 91, 17, 33], ["+", 8, 196, 0, 503, 49, 200, 51, 91, 439, 499]]
3
139
import java.text.*; import java.util.*; class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int mx = Integer.MIN_VALUE; int mn = Integer.MAX_VALUE; int sum = 0; for (int i = 0; i < n; i++) { int a = sc.nextInt...
import java.text.*; import java.util.*; class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int mx = Integer.MIN_VALUE; int mn = Integer.MAX_VALUE; long sum = 0; for (int i = 0; i < n; i++) { int a = sc.nextIn...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
144
import java.util.*; class Main { public static void main(String args[]) { int num, max, min; int sum = 0; Scanner scan = new Scanner(System.in); num = scan.nextInt(); int[] arr = new int[num]; for (int i = 0; i < num; i++) { arr[i] = scan.nextInt(); sum += arr[i]; } Arra...
import java.util.*; class Main { public static void main(String args[]) { int num, max, min; long sum = 0; Scanner scan = new Scanner(System.in); num = scan.nextInt(); int[] arr = new int[num]; for (int i = 0; i < num; i++) { arr[i] = scan.nextInt(); sum += arr[i]; } Arr...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
140
import java.util.Random; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Random ran = new Random(); int n = sc.nextInt(); int sum = 0; int num[] = new int[n]; for (int i = 0; i < num.length; i++) { num[i] = ran....
// 4-D import java.util.Random; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Random ran = new Random(); int n = sc.nextInt(); long sum = 0; int num[] = new int[n]; /*for(int i = 0 ; i < num.length ; i++ ){ ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 1, 0, 11, 12, 492, 500, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 492, 500, 22], ["-", 0, 1, 0, 11, 12, 492, 3, 4, 0, 499]]
3
211
import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int a, b, c, d, e; a = 2; b = sc.nextInt(); ...
import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long a, b, c, d, e; a = 2; b = sc.nextLong(); ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22]]
3
163
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = Integer.parseInt(sc.nextLine()); String[] str = sc.nextLine().split(" "); int max = Integer.parseInt(str[0]); int total = Integer.parseInt(str[0]); int min = I...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = Integer.parseInt(sc.nextLine()); String[] str = sc.nextLine().split(" "); long max = Integer.parseInt(str[0]); long total = Integer.parseInt(str[0]); long min ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
204
import java.io.*; import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] array = new int[n]; for (int i = 0; i < n; i++) { array[i] = sc.nextInt(); } int max = array[0]; int min = array[0]; in...
import java.io.*; import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] array = new int[n]; for (int i = 0; i < n; i++) { array[i] = sc.nextInt(); } int max = array[0]; int min = array[0]; lo...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
186
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in)); String s; int inCnt = 0; while ((s = stdIn.readLine()) != null) { inCnt++;...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in)); String s; int inCnt = 0; while ((s = stdIn.readLine()) != null) { inCnt++;...
[["-", 8, 498, 0, 195, 8, 196, 0, 503, 0, 21], ["+", 8, 498, 0, 195, 8, 196, 0, 503, 0, 35], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
218
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int count = scanner.nextInt(); int min = Integer.MAX_VALUE; int max = Integer.MIN_VALUE; int sum = 0; for (int i = 0; i < count; i++) { int t = scanner.nex...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int count = scanner.nextInt(); long min = Integer.MAX_VALUE; long max = Integer.MIN_VALUE; long sum = 0; for (int i = 0; i < count; i++) { long t = scanner...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 7, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 7, 8, 196, 0, 503, 39, 506, 0, 96]]
3
142
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int b = scan.nextInt(); int min = 1000000, max = -10000000, sum = 0; for (int a = 0; a < b; a++) { int c = scan.nextInt(); if (min > c) min = c; if (max < c...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int b = scan.nextInt(); long min = 1000000, max = -10000000, sum = 0; for (int a = 0; a < b; a++) { int c = scan.nextInt(); if (min > c) min = c; if (max < c...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
129
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner scan = new Scanner(System.in); int X = scan.nextInt(); int y = 2147483647; int z = 0; long sum = 0; for (int i = ...
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner scan = new Scanner(System.in); int X = scan.nextInt(); int y = 2147483647; int z = -2147483648; long sum = 0; for...
[["-", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 503, 49, 200, 51, 91, 17, 33], ["+", 8, 196, 0, 503, 49, 200, 51, 91, 439, 499]]
3
141
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner scan = new Scanner(System.in); int X = scan.nextInt(); int[] n = new int[X]; int sum = 0; for (int i = 0; i < X; i++)...
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner scan = new Scanner(System.in); int X = scan.nextInt(); int[] n = new int[X]; long sum = 0; for (int i = 0; i < X; i++...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
181
import java.util.Scanner; public class Main { public static void main(String[] args) { int min = 0, max = 0, sum = 0; Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = sc.nextInt(); if (i == 0) { min = a[i]; ...
import java.util.Scanner; public class Main { public static void main(String[] args) { long min = 0, max = 0, sum = 0; Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = sc.nextInt(); if (i == 0) { min = a[i]; ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
193
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int M = 1000000, m = -1000000; long S = 0; for (int i = 1; i <= n; i++) { int x = sc.nextInt(); M = Math.max(M, x); m = Math.min(m, ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int M = -1000000, m = 1000000; long S = 0; for (int i = 1; i <= n; i++) { int x = sc.nextInt(); M = Math.max(M, x); m = Math.min(m, ...
[["+", 8, 196, 0, 503, 49, 200, 51, 91, 17, 33], ["-", 8, 196, 0, 503, 49, 200, 51, 91, 17, 33], ["-", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22], ["+", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22]]
3
133
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { int max = Integer.MIN_VALUE; int min = Integer.MAX_VALUE; int sum = 0; BufferedReader br = new BufferedReader(new InputStreamR...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { long max = Integer.MIN_VALUE; long min = Integer.MAX_VALUE; long sum = 0; BufferedReader br = new BufferedReader(new InputStre...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 1, 0, 11, 12, 492, 500, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 492, 500, 22], ["-", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22]]
3
188
import java.util.Scanner; public class Main { public static void main(String[] args) { int min = 1000000; int max = -1000000; int sum = 0; try (Scanner sc = new Scanner(System.in)) { int n = sc.nextInt(); if (n < 0 || n > 10000) { throw new RuntimeException(); } int ai...
import java.util.Scanner; public class Main { public static void main(String[] args) { int min = 1000000; int max = -1000000; long sum = 0; try (Scanner sc = new Scanner(System.in)) { int n = sc.nextInt(); if (n < 0 || n > 10000) { throw new RuntimeException(); } int a...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
168
import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); ArrayList<Integer> array = new ArrayList<Integer>(); int sum = 0; int n = sc.nextInt(); int a...
import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); ArrayList<Integer> array = new ArrayList<Integer>(); long sum = 0; int n = sc.nextInt(); int ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 57, 15, 15, 0, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 19]]
3
207
import java.util.Scanner; public class Main { public static void main(String[] args) { int min = 0, max = 0, sum = 0; Scanner scan = new Scanner(System.in); // while(scan.hasNext()){ int n = scan.nextInt(); int a[] = new int[n]; for (int i = 0; i < n; i++) { a[i] = scan.nextInt(); ...
import java.util.Scanner; public class Main { public static void main(String[] args) { int min = 0, max = 0; long sum = 0; Scanner scan = new Scanner(System.in); // while(scan.hasNext()){ int n = scan.nextInt(); int a[] = new int[n]; for (int i = 0; i < n; i++) { a[i] = scan.nextInt...
[["-", 8, 498, 0, 195, 8, 196, 0, 503, 0, 21], ["+", 8, 498, 0, 195, 8, 196, 0, 503, 0, 35], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
186
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] a = new int[n]; int sum = 0; int max = -1000000, min = 1000000; for (int i = 0; i < n; i++) { a[i] = scan.nextInt(); sum += a[i]...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] a = new int[n]; long sum = 0; int max = -1000000, min = 1000000; for (int i = 0; i < n; i++) { a[i] = scan.nextInt(); sum += a[i...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
155
import java.io.*; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String input1 = br.readLine(); String[] input2 = br.readLine().split(" "); int size = Integer.parseInt(input1); int[] a = new int[...
import java.io.*; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String input1 = br.readLine(); String[] input2 = br.readLine().split(" "); int size = Integer.parseInt(input1); int[] a = new int[...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
214
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner input = new Scanner(System.in); int[] array = new int[input.nextInt()]; int total = 0; for (int i = 0; i < array.length; i++) { array[i] = input.nextInt(); ...
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner input = new Scanner(System.in); int[] array = new int[input.nextInt()]; long total = 0; for (int i = 0; i < array.length; i++) { array[i] = input.nextInt(); ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
138
import java.util.Scanner; class Main { public static void main(String[] arg) { int n, max = -1000000, min = 1000000, input; long sum = 0; Scanner in = new Scanner(System.in); n = in.nextInt(); for (int i = 0; i < n; i++) { input = in.nextInt(); if (input > max) { max = input...
import java.util.Scanner; class Main { public static void main(String[] arg) { int n, max = -1000000, min = 1000000, input; long sum = 0; Scanner in = new Scanner(System.in); n = in.nextInt(); for (int i = 0; i < n; i++) { input = in.nextInt(); if (input > max) { max = input...
[["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 95]]
3
135
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] a = new int[n]; int max, min, sum = 0; ArrayList<Integer> z = new ArrayList<>(); for (int i = 0; i < n; i++) { z.add(scan.nextInt()); ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] a = new int[n]; long max, min, sum = 0; ArrayList<Integer> z = new ArrayList<>(); for (int i = 0; i < n; i++) { z.add(scan.nextInt()); ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
156
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int a = in.nextInt(); int max = a; int min = a; long sum = 0; for (int i = 1; i < n; i++) { a = in.nextInt(); if (a < min) { min =...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int a = in.nextInt(); int max = a; int min = a; long sum = a; for (int i = 1; i < n; i++) { a = in.nextInt(); if (a < min) { min =...
[["-", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 51, 22]]
3
140
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int max = -100000, min = 1000000, input; long sum = 0; for (int i = 0; i < n; i++) { input = scan.nextInt(); if (input > max) max = ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int max = -1000000, min = 1000000, input; long sum = 0; for (int i = 0; i < n; i++) { input = scan.nextInt(); if (input > max) max =...
[["-", 8, 196, 0, 503, 49, 200, 51, 91, 439, 499], ["+", 8, 196, 0, 503, 49, 200, 51, 91, 439, 499]]
3
130
import java.util.Scanner; public class Main { void minmaxsum() { Scanner s = new Scanner(System.in); int i = s.nextInt(); int max, min, sum; max = -1000001; min = 1000001; sum = 0; for (int j = 0; j < i; j++) { int tmp = s.nextInt(); if (max < tmp) max = tmp; if (...
import java.util.Scanner; public class Main { void minmaxsum() { Scanner s = new Scanner(System.in); int i = s.nextInt(); long max, min, sum; max = -1000001; min = 1000001; sum = 0; for (int j = 0; j < i; j++) { int tmp = s.nextInt(); if (max < tmp) max = tmp; if ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
154
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int goukei = b; int saishou = b, saidai = b; for (int i = 1; i <= a - 1; i++) { if (a < 0 && a >= 10...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); long goukei = b; long saishou = b, saidai = b; for (int i = 1; i <= a - 1; i++) { if (a < 0 && a >= ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 44]]
3
169
import java.io.*; class Main { public static void main(String args[]) throws IOException { BufferedReader buf = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(buf.readLine()); String[] str = buf.readLine().split(" "); int tmp; int max = -1000000; int min = 100...
import java.io.*; class Main { public static void main(String args[]) throws IOException { BufferedReader buf = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(buf.readLine()); String[] str = buf.readLine().split(" "); int tmp; int max = -1000000; int min = 100...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
166
/* package whatever; // don't place package name! */ import java.io.*; import java.lang.*; import java.util.*; /* Name of the class has to be "Main" only if the class is public. */ class Ideone { public static void main(String[] args) throws java.lang.Exception { // your code goes here BufferedReader r = ne...
/* package whatever; // don't place package name! */ import java.io.*; import java.lang.*; import java.util.*; /* Name of the class has to be "Main" only if the class is public. */ class Main { public static void main(String[] args) throws java.lang.Exception { // your code goes here BufferedReader r = new ...
[["-", 36, 36, 36, 36, 0, 493, 0, 235, 141, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 235, 141, 22], ["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 7, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 7, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 503, 49, 200, 51, 49...
3
253
import java.util.Scanner; public class Main { public static void main(String[] args) { int n, x; int max = -1000000; int min = 1000000; int sum = 0; Scanner sc = new Scanner(System.in); n = sc.nextInt(); sc.hasNext(); for (int i = 0; i < n; i++) { x = sc.nextInt(); if (...
import java.util.Scanner; public class Main { public static void main(String[] args) { int n, x; int max = -1000000; int min = 1000000; long sum = 0; Scanner sc = new Scanner(System.in); n = sc.nextInt(); sc.hasNext(); for (int i = 0; i < n; i++) { x = sc.nextInt(); if ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
149
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String str1 = scan.nextLine(); String str2 = scan.nextLine(); scan.close(); int n = Integer.parseInt(str1); String[] ai = str2.split(" ", 0); int sVal = 0; i...
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String str1 = scan.nextLine(); String str2 = scan.nextLine(); scan.close(); int n = Integer.parseInt(str1); String[] ai = str2.split(" ", 0); int sVal = 0; i...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 7, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 7, 8, 196, 0, 503, 39, 506, 0, 96]]
3
342
import java.util.ArrayList; import java.util.Scanner; public class Main { void run() { Scanner scan = new Scanner(System.in); ArrayList<Integer> list = new ArrayList<Integer>(); int n = scan.nextInt(); int min = 0; int max = 0; int sum = 0; for (int i = 0; i < n; i++) { list.add(sca...
import java.util.ArrayList; import java.util.Scanner; public class Main { void run() { Scanner scan = new Scanner(System.in); ArrayList<Integer> list = new ArrayList<Integer>(); int n = scan.nextInt(); int min = 0; int max = 0; long sum = 0; for (int i = 0; i < n; i++) { list.add(sc...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
197
import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String[] strs = br.readLine().split(" "); long min = 10000; long max = -10000; ...
import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String[] strs = br.readLine().split(" "); long min = 1000000; long max = -1000000...
[["-", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["-", 8, 196, 0, 503, 49, 200, 51, 91, 439, 499], ["+", 8, 196, 0, 503, 49, 200, 51, 91, 439, 499]]
3
179
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] a; a = new int[10020]; int n = scan.nextInt(); int i; int sum = 0; for (i = 1; i <= n; ++i) { a[i] = scan.nextInt(); } int tmp = a[1]; int t...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] a; a = new int[10020]; int n = scan.nextInt(); int i; long sum = 0; for (i = 1; i <= n; ++i) { a[i] = scan.nextInt(); } int tmp = a[1]; int ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
188
import java.util.*; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int x = sc.nextInt(); int max = x; int min = x; int sum = x; for (int i = 1; i < n; i++) { x = sc.nextInt(); if (max < x) max = x...
import java.util.*; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int x = sc.nextInt(); int max = x; int min = x; long sum = x; for (int i = 1; i < n; i++) { x = sc.nextInt(); if (max < x) max = ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
134
import java.io.*; import java.util.ArrayList; import java.util.Collections; public class Main { public static void main(String[] args) throws IOException { int x = 0; int sum = 0; ArrayList<Integer> num = new ArrayList<>(); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ...
import java.io.*; import java.util.ArrayList; import java.util.Collections; public class Main { public static void main(String[] args) throws IOException { int x = 0; long sum = 0; ArrayList<Integer> num = new ArrayList<>(); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
229
import java.util.Arrays; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int sum = 0; int nl[] = new int[n]; for (int i = 0; i < n; i++) { nl[i] = sc.nextInt(); sum = sum + nl[i]; } A...
import java.util.Arrays; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long sum = 0; int nl[] = new int[n]; for (int i = 0; i < n; i++) { nl[i] = sc.nextInt(); sum = sum + nl[i]; } A...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
138
import static java.lang.System.out; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int range = scan.nextInt(); int min = 0; int max = 0; int sum = 0; for (int i = 0; i < range; i += 1) { int tmp = scan.next...
import static java.lang.System.out; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int range = scan.nextInt(); long min = 0; long max = 0; long sum = 0; for (int i = 0; i < range; i += 1) { int tmp = scan.n...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
161
import java.io.IOException; import java.util.Scanner; class Main { public static void main(String[] args) throws IOException { Scanner scan = new Scanner(System.in); int n = Integer.parseInt(scan.nextLine()); int big = Integer.MIN_VALUE; int small = Integer.MAX_VALUE; int total = 0; for (int ...
import java.io.IOException; import java.util.Scanner; class Main { public static void main(String[] args) throws IOException { Scanner scan = new Scanner(System.in); int n = Integer.parseInt(scan.nextLine()); int big = Integer.MIN_VALUE; int small = Integer.MAX_VALUE; long total = 0; for (int...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
152
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { int c; BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); StringBuilder builder = new StringBuil...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { int c; BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); StringBuilder builder = new StringBuil...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96]]
3
396
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] values = new int[n]; for (int i = 0; i < n; i++) { values[i] = scan.nextInt(); } int min = values[0]; int max = values[0]; int s...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); long[] values = new long[n]; for (int i = 0; i < n; i++) { values[i] = scan.nextInt(); } long min = values[0]; long max = values[0]; l...
[["-", 8, 196, 0, 503, 39, 224, 468, 506, 0, 507], ["+", 8, 196, 0, 503, 39, 224, 468, 506, 0, 96], ["-", 0, 503, 49, 200, 51, 227, 39, 506, 0, 507], ["+", 0, 503, 49, 200, 51, 227, 39, 506, 0, 96], ["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
181
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int a = sc.nextInt(); int Max = a; int min = a; int sum = a; for (int i = 0; i < n - 1; i++) { int b = sc.nextInt(); sum += b; ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int a = sc.nextInt(); int Max = a; int min = a; long sum = a; for (int i = 0; i < n - 1; i++) { int b = sc.nextInt(); sum += b; ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
140
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int i = Integer.parseInt(br.readLine()); int[] su = new i...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int i = Integer.parseInt(br.readLine()); int[] su = new i...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
238
import java.util.*; class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int min = 1000000, max = -1000000, sum = 0; int n = sc.nextInt(); for (int i = 0; i < n; i++) { int a = sc.nextInt(); sum += a; min = Math.min(a, min); max = Math.m...
import java.util.*; class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); long min = 1000000, max = -1000000, sum = 0; int n = sc.nextInt(); for (int i = 0; i < n; i++) { long a = sc.nextInt(); sum += a; min = Math.min(a, min); max = Math...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 7, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 7, 8, 196, 0, 503, 39, 506, 0, 96]]
3
129