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
import java.util.Scanner; public class Main { int min = Integer.MAX_VALUE; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); System.out.println(N * Math.PI); } }
import java.util.Scanner; public class Main { int min = Integer.MAX_VALUE; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); System.out.println(2 * N * Math.PI); } }
[["+", 0, 492, 3, 4, 0, 16, 31, 16, 31, 499], ["+", 0, 492, 3, 4, 0, 16, 31, 16, 17, 48]]
3
64
#include <bits/stdc++.h> #include <iostream> using namespace std; // Compiler version g++ 6.3.0 int main() { int r; cin >> r; cout << 3.14159 * r << "\n"; return 0; }
#include <bits/stdc++.h> #include <iostream> using namespace std; // Compiler version g++ 6.3.0 int main() { int r; cin >> r; cout << 2 * 3.14159 * r << "\n"; return 0; }
[["+", 0, 16, 31, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48]]
1
35
#pragma GCC optimize("Ofast") #include <algorithm> #include <bits/stdc++.h> #include <cstring> #include <iostream> #include <math.h> #include <vector> using namespace std; typedef long long ll; int main() { int n; ll R, s; cin >> R; s = 2 * R * M_PI; cout << s; }
#pragma GCC optimize("Ofast") #include <algorithm> #include <bits/stdc++.h> #include <cstring> #include <iostream> #include <math.h> #include <vector> using namespace std; typedef long long ll; int main() { int n; ll R; float s; cin >> R; s = 2 * R * M_PI; cout << s; }
[["-", 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]]
1
53
#include <bits/stdc++.h> using namespace std; int main() { int r; cin >> r; cout << double(r * 3.141592); }
#include <bits/stdc++.h> using namespace std; int main() { int r; cin >> r; cout << double(r * 3.141592 * 2); }
[["+", 0, 16, 12, 2, 3, 4, 0, 16, 17, 48], ["+", 0, 16, 12, 2, 3, 4, 0, 16, 12, 13]]
1
28
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); double ans = n * 3.14; System.out.println(ans); } }
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); double ans = n * 2 * Math.PI; System.out.println(ans); } }
[["-", 8, 196, 0, 503, 49, 200, 51, 16, 12, 515], ["+", 0, 503, 49, 200, 51, 16, 31, 16, 12, 499], ["+", 8, 196, 0, 503, 49, 200, 51, 16, 17, 48], ["+", 0, 503, 49, 200, 51, 16, 12, 509, 500, 22], ["+", 0, 503, 49, 200, 51, 16, 12, 509, 0, 131], ["+", 0, 503, 49, 200, 51, 16, 12, 509, 119, 22]]
3
60
import numpy R = int(input()) print(R**2 * numpy.pi)
import numpy R = int(input()) print(R*2 * numpy.pi)
[["-", 0, 652, 3, 4, 0, 657, 31, 657, 17, 578], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 48]]
5
20
import sys from math import pi def get_ints(): return map(int, sys.stdin.readline().strip().split()) def get_array(): return list(get_ints()) def input(): return sys.stdin.readline().strip().split() r = int(input()) print(2*pi*r)
import sys from math import pi def get_ints(): return map(int, sys.stdin.readline().strip().split()) def get_array(): return list(get_ints()) def input(): return sys.stdin.readline().strip() r = int(input()) print(2*pi*r)
[["-", 8, 196, 0, 37, 0, 652, 63, 319, 0, 131], ["-", 8, 196, 0, 37, 0, 652, 63, 319, 319, 22], ["-", 8, 196, 0, 37, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 37, 0, 652, 3, 4, 0, 25]]
5
81
n = int(input()) pi = 3.1415926 print(n*pi)
n = int(input()) pi = 3.1415926 print(2*n*pi)
[["+", 0, 652, 3, 4, 0, 657, 31, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 48]]
5
17
#include <algorithm> #include <bitset> #include <cstdlib> #include <iostream> #include <queue> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { int r; cin >> r; cout << r * 3.14159 << endl; return 0; }
#include <algorithm> #include <bitset> #include <cstdlib> #include <iostream> #include <queue> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { double r; cin >> r; cout << 2 * r * 3.14159 << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48]]
1
44
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a; double d; d = (a * 1.00); d = 2 * 3.1416; cout << d << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a; double d; d = (a * 1.00); d = 2 * 3.1416 * a; cout << d << endl; return 0; }
[["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
47
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <vector> using namespace std; #define ll long long int main() { int r; cin >> r; double pi = 3.14159265359; double a = 2 * pi * r * r; printf("%.2f", a); return 0; }
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <vector> using namespace std; #define ll long long int main() { int r; cin >> r; double pi = 3.14159265359; double a = 2 * pi * r; printf("%.2f", a); return 0; }
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 48], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]]
1
58
#include <cmath> #include <iostream> using namespace std; int main() { int N; cin >> N; cout << M_PI * N << endl; return 0; }
#include <cmath> #include <iostream> using namespace std; int main() { int N; cin >> N; cout << 2 * M_PI * N << endl; return 0; }
[["+", 0, 16, 31, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48]]
1
32
LI = lambda: list(map(int,input().split())) MI = lambda: map(int,input().split()) yes = lambda: print("YES") no = lambda: print("NO") I = lambda: list(input()) J = lambda x: "".join(x) II = lambda: int(input()) SI = lambda: input() #---khan17---template t = int(input()) print(3.14*t**2)
import math LI = lambda: list(map(int,input().split())) MI = lambda: map(int,input().split()) yes = lambda: print("YES") no = lambda: print("NO") I = lambda: list(input()) J = lambda x: "".join(x) II = lambda: int(input()) SI = lambda: input() #---khan17---template t = int(input()) print(math.pi*t*2)
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 31, 531], ["+", 3, 4, 0, 657, 31, 657, 31, 319, 500, 22], ["+", 3, 4, 0, 657, 31, 657, 31, 319, 0, 131], ["+", 3, 4, 0, 657, 31, 657, 31, 319, 319, 22], ["-", 0, 652, 3, 4, 0, 657, 12, 657, ...
5
111
LI = lambda: list(map(int,input().split())) MI = lambda: map(int,input().split()) yes = lambda: print("YES") no = lambda: print("NO") I = lambda: list(input()) J = lambda x: "".join(x) II = lambda: int(input()) SI = lambda: input() #---khan17---template t = int(input()) print(3.14*t**2)
LI = lambda: list(map(int,input().split())) MI = lambda: map(int,input().split()) yes = lambda: print("YES") no = lambda: print("NO") I = lambda: list(input()) J = lambda x: "".join(x) II = lambda: int(input()) SI = lambda: input() #---khan17---template t = int(input()) print(3.14*t*2)
[["-", 0, 652, 3, 4, 0, 657, 12, 657, 17, 578], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 48]]
5
111
r = int(input()) p = 22/7 print(2*pi*r)
r = int(input()) pi = 22/7 print(2*pi*r)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]]
5
21
#include <bits/stdc++.h> using namespace std; int main() { double R; cin >> R; R = R * 3.14159265358979323846264; cout << R << endl; }
#include <bits/stdc++.h> using namespace std; int main() { double R; cin >> R; R = R * 2.00 * 3.14159265358979323846264; cout << R << endl; }
[["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48]]
1
31
a = int(input()) printf(a * 2 * 3.1415926535)
a = int(input()) print(a * 2 * 3.1415926535)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22]]
5
16
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) const double PI = 3.141592653589793; using namespace std; int main() { double r; cin >> r; // cout << r * PI << endl; printf("%.9f\n", r * PI); return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) const double PI = 3.141592653589793; using namespace std; int main() { double r; cin >> r; // cout << r * PI << endl; printf("%.9f\n", 2 * r * PI); return 0; }
[["+", 0, 2, 3, 4, 0, 16, 31, 16, 31, 13], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 17, 48]]
1
49
#!/usr/bin/env python3 t = int(input()) print(3.1415926*t)
t = int(input()) print(3.1415926*2*t)
[["+", 0, 652, 3, 4, 0, 657, 31, 657, 12, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 48]]
5
15
from math import comb, factorial, gcd, isqrt, perm, exp, log, log2, log10, sqrt, pi, acos, asin, atan ,atan2, cos, sin, tan print(int(input())*pi)
from math import comb, factorial, gcd, isqrt, perm, exp, log, log2, log10, sqrt, pi, acos, asin, atan ,atan2, cos, sin, tan print(2*int(input())*pi)
[["+", 0, 652, 3, 4, 0, 657, 31, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 48]]
5
49
#include <bits/stdc++.h> using namespace std; const int PI = 3.1415926535897; int main() { double R; cin >> R; cout << R * 2 * PI << endl; }
#include <bits/stdc++.h> using namespace std; const double PI = 3.1415926535897; int main() { double R; cin >> R; cout << R * 2 * PI << endl; }
[["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40]]
1
35
#include <bits/stdc++.h> using namespace std; double n; int main() { scanf("%lf", &n); printf("%.3lf", n * 3.14159); }
#include <bits/stdc++.h> using namespace std; double n; int main() { scanf("%lf", &n); printf("%.3lf", n * 3.14159 * 2); }
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 48], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
36
#include <bits/stdc++.h> using namespace std; int main() { double r; cin >> r; int ans = 2.0 * r * 3.141592; cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double r; cin >> r; double ans = 2.0 * r * 3.141592; cout << ans; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
35
r = int(input()) import math print(math.pi * r)
r = int(input()) import math print(math.pi * r*2)
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 48], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
18
#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; using ll = long long; #define rep(i, j, n) for (int i = j; i < (int)(n); i++) const ll MOD = 1000000007; const ll INFL = (1LL << 60); const int INFI = (1 << 30); int main() { double R; cin >> R; cout << 3.1415926535 * R << endl; }
#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; using ll = long long; #define rep(i, j, n) for (int i = j; i < (int)(n); i++) const ll MOD = 1000000007; const ll INFL = (1LL << 60); const int INFI = (1 << 30); int main() { double R; cin >> R; cout << 3.1415926535 * 2.0 * R << endl; }
[["+", 0, 16, 31, 16, 12, 16, 31, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 48]]
1
79
import math a= int(input) print(2 * a * math.pi)
import math a= int(input()) print(2 * a * math.pi)
[["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
18
#include <bits/stdc++.h> using namespace std; int main() { int n; scanf("%d", &n); printf("%f", (double)n * acos(-1)); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; scanf("%d", &n); printf("%.19f", 2 * (double)n * acos(-1)); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 31, 13], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 17, 48]]
1
45
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { double R; cin >> R; double A = R * R * 3.14; cout << A << endl; }
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { double R; cin >> R; double A = 2 * R * 3.14; cout << A << endl; }
[["-", 0, 43, 49, 50, 51, 16, 31, 16, 31, 22], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 31, 13]]
1
38
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int num = 1e9 + 7; int main() { double pi = 3.141592; double r; cin >> r; cout << fixed << setprecision << 2 * pi * r << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int num = 1e9 + 7; int main() { double pi = 3.141592; double r; cin >> r; cout << fixed << setprecision(10) << (double)2 * pi * r << endl; }
[["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 25], ["+", 31, 16, 12, 16, 31, 16, 31, 74, 0, 24], ["+", 12, 16, 31, 16, 31, 74, 39, 77, 39, 40], ["+", 31, 16, 12, 16, 31, 16, 31, 74, 0, 25]]
1
51
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double num = sc.nextDouble(); System.out.println(num * 3.14159265); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double num = sc.nextDouble(); System.out.println(num * 3.14159265 * 2); } }
[["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 48], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 12, 499]]
3
55
#include <bits/stdc++.h> using namespace std; int main() { int R; cin >> R; cout << fixed << setprecision(3); cout << R * M_PI << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int R; cin >> R; cout << fixed << setprecision(10); cout << 2 * R * (M_PI) << endl; }
[["-", 0, 1, 0, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 12, 23, 0, 24], ["+", 0, 16, 31, 16, 12, 16, 12, 23, 0, 25]]
1
36
import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int N = sc.nextInt(); System.out.println(N * 3.1415); } }
import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int N = sc.nextInt(); System.out.println(2 * N * 3.1415); } }
[["+", 0, 492, 3, 4, 0, 16, 31, 16, 31, 499], ["+", 0, 492, 3, 4, 0, 16, 31, 16, 17, 48]]
3
55
#include <iostream> using namespace std; int main() { float R, tot; cin >> R; tot = R * R * 3.14159265; cout << tot; return 0; }
#include <iostream> using namespace std; int main() { float R, tot; cin >> R; tot = 2 * R * 3.14159265; cout << tot; return 0; }
[["-", 0, 1, 0, 11, 12, 16, 31, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 13]]
1
36
#include <stdio.h> int main() { int a; float b = 0; scanf("%f", &a); b = a * 2 * 3.14; printf("%f", b); return 0; }
#include <stdio.h> int main() { float a; float b = 0; scanf("%f", &a); b = a * 2 * 3.14; printf("%f", b); return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
0
46
import sys import math from collections import deque input = lambda: sys.stdin.readline().rstrip() Yes = lambda boolean: print('Yes') if boolean else print('No') YES = lambda boolean: print('YES') if boolean else print('NO') aint = lambda: int(input()) ints = lambda: list(map(int, input().split())) is_even = lambda x: ...
import sys import math from collections import deque input = lambda: sys.stdin.readline().rstrip() Yes = lambda boolean: print('Yes') if boolean else print('No') YES = lambda boolean: print('YES') if boolean else print('NO') aint = lambda: int(input()) ints = lambda: list(map(int, input().split())) is_even = lambda x: ...
[["-", 3, 4, 0, 657, 12, 652, 3, 4, 0, 24], ["-", 3, 4, 0, 657, 12, 652, 3, 4, 0, 25]]
5
149
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> P; int main() { double n; cin >> n; cout << std::fixed << std::setprecision(4) << (double)n * 3.1415926 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> P; int main() { double n; cin >> n; cout << std::fixed << std::setprecision(4) << (double)n * 3.1415926 * 2 << endl; return 0; }
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
59
print(3.141592*int(input()))
print(3.141592*2*int(input()))
[["+", 0, 652, 3, 4, 0, 657, 31, 657, 12, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 48]]
5
11
#include <bits/stdc++.h> using namespace std; #define int long long #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b)) #define fast \ ios_base::sync_with_stdio(false); \ cin....
#include <bits/stdc++.h> using namespace std; #define int long long #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b)) #define fast \ ios_base::sync_with_stdio(false); \ cin....
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
60
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main() { double a; cin >> a; cout << a * 3.1415926 << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main() { double a; cin >> a; cout << 2 * a * 3.1415926 << endl; }
[["+", 0, 16, 31, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48]]
1
35
#include <bits/stdc++.h> using namespace std; int main() { double n; cin >> n; cout << 3.14 * n << endl; }
#include <bits/stdc++.h> using namespace std; int main() { double n; cin >> n; cout << 3.14 * n * 2 << endl; }
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
27
import math r = imt(input()) pi = math.pi ans = 2 * pi * r print(ans)
import math r = int(input()) pi = math.pi ans = 2 * pi * r print(ans)
[["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]]
5
26
#include <bits/stdc++.h> using namespace std; using ll = long long; using pll = pair<ll, ll>; using vl = vector<ll>; /* short */ #define pb push_back #define mp make_pair #define Fi first #define Se second #define ALL(v) begin(v), end(v) #define RALL(v) rbegin(v), rend(v) /* REPmacro */ #define FOR(i, a, b) for (int ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using pll = pair<ll, ll>; using vl = vector<ll>; /* short */ #define pb push_back #define mp make_pair #define Fi first #define Se second #define ALL(v) begin(v), end(v) #define RALL(v) rbegin(v), rend(v) /* REPmacro */ #define FOR(i, a, b) for (int ...
[["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 48], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]]
1
244
r = int(input()) a = 2 * pi * r print(a)
r = int(input()) a = 2 * 3.1415 * r print(a)
[["-", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 12, 531]]
5
19
#include <iostream> using namespace std; int main() { int R; cin >> R; cout << double(R) * 3.1415926535 << endl; }
#include <iostream> using namespace std; int main() { int R; cin >> R; cout << double(R) * 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899 * 2 << endl; }
[["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
30
#include <bits/stdc++.h> using namespace std; using lint = long long int; #define FOR(i, begin, end) \ for (int i = (begin), i##_end_ = (end); i < i##_end_; i++) #define IFOR(i, begin, end) \ for (int i = (end)-1,...
#include <bits/stdc++.h> using namespace std; using lint = long long int; #define FOR(i, begin, end) \ for (int i = (begin), i##_end_ = (end); i < i##_end_; i++) #define IFOR(i, begin, end) \ for (int i = (end)-1,...
[["+", 0, 16, 31, 16, 12, 16, 31, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 48]]
1
138
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { // string S; int X; cin >> X; cout << 2 * X << endl; } /* answer #include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace s...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { // string S; int X; cin >> X; cout << 2 * X * 3.14 << endl; } /* answer #include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using name...
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
53
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // get a integer int R = sc.nextInt(); System.out.println(Math.PI * R * R); } }
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // get a integer double R = sc.nextInt(); System.out.println(Math.PI * R * 2); } }
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512], ["-", 0, 1, 0, 492, 3, 4, 0, 16, 12, 22], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 12, 499]]
3
60
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // get a integer int R = sc.nextInt(); System.out.println(Math.PI * R * R); } }
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); System.out.println(2 * Math.PI * a); } }
[["-", 0, 195, 8, 196, 0, 503, 49, 200, 141, 22], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 141, 22], ["+", 0, 492, 3, 4, 0, 16, 31, 16, 31, 499], ["+", 0, 492, 3, 4, 0, 16, 31, 16, 17, 48], ["-", 0, 492, 3, 4, 0, 16, 31, 16, 17, 48], ["-", 0, 492, 3, 4, 0, 16, 31, 16, 12, 22], ["-", 0, 1, 0, 492, 3, 4, 0, 16, 12, 22], ["...
3
60
#include <stdio.h> int r; int main() { scanf("%d", &r); printf("%f", 2 * r * 1.1415); return 0; }
#include <stdio.h> int r; int main() { scanf("%d", &r); printf("%f", 2 * r * 3.1415); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
0
37
#include <bits/stdc++.h> #define PI acos(-1) using namespace std; int main() { double r, red; cin >> r; red = 2 * PI * (r * r); cout << fixed << setprecision(20) << red << endl; return 0; }
#include <bits/stdc++.h> #define PI acos(-1) using namespace std; int main() { double r, red; cin >> r; red = 2 * PI * r; cout << fixed << setprecision(20) << red << endl; return 0; }
[["-", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 31, 22], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 17, 48], ["-", 0, 1, 0, 11, 12, 16, 12, 23, 0, 25]]
1
52
#include <bits/stdc++.h> using namespace std; int main() { int a; double ans = 0; cin >> a; ans = double(a) * M_PI; cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int a; double ans = 0; cin >> a; ans = 2.0 * a * M_PI; cout << ans << endl; }
[["-", 0, 1, 0, 11, 12, 16, 31, 2, 63, 40], ["-", 0, 11, 12, 16, 31, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["-", 0, 11, 12, 16, 31, 2, 3, 4, 0, 25]]
1
39
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int gcd(int p, int q) { if (p % q == 0) { return q; } return gcd(q, p % q); } int main() { double r; cin >> r; cout << r * 3.141592 << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int gcd(int p, int q) { if (p % q == 0) { return q; } return gcd(q, p % q); } int main() { double r; cin >> r; cout << 2 * r * M_PI << endl; }
[["+", 0, 16, 31, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]]
1
69
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int r; cin >> r; cout << 6.38 * r; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int r; cin >> r; cout << 6.28 * r; }
[["-", 8, 9, 0, 1, 0, 16, 12, 16, 31, 13], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 31, 13]]
1
30
from math import pi r = int(input()) print(pi * r)
from math import pi r = int(input()) print(2 * pi * r)
[["+", 0, 652, 3, 4, 0, 657, 31, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 48]]
5
18
#include <iostream> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string> using namespace std; int main() { int i, j, k, n; double kk; cin >> kk; cout << kk * 3.14 << endl; }
#include <iostream> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string> using namespace std; int main() { int i, j, k, n; double kk; cin >> kk; cout << kk * 6.28 << endl; }
[["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
44
#include <bits/stdc++.h> #include <numeric> using namespace std; int main() { double a; cin >> a; cout << 3.14159265 * a; }
#include <bits/stdc++.h> #include <numeric> using namespace std; int main() { double a; cin >> a; cout << 3.14159265 * a * 2; }
[["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13]]
1
27
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define ll long long #define ull unsigned long long #define FI(i, a, n) for (int i = a; i <= n; i++) #define RFI(i, ...
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define ll long long #define ull unsigned long long #define FI(i, a, n) for (int i = a; i <= n; i++) #define RFI(i, ...
[["+", 0, 1, 0, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 1, 0, 16, 12, 16, 31, 16, 17, 48]]
1
145
import math N = int(input()) print(2 * math.pi)
import math N = int(input()) print(2 * N * math.pi)
[["+", 0, 652, 3, 4, 0, 657, 31, 657, 12, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 48]]
5
18
r=int(input()) print(3.1415926535*r)
r=int(input()) print(3.1415926535*r*2)
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 48], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
14
#include <algorithm> #include <cmath> #include <ctime> #include <fstream> #include <functional> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> using...
#include <algorithm> #include <cmath> #include <ctime> #include <fstream> #include <functional> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> using...
[["-", 0, 43, 49, 50, 51, 16, 31, 16, 31, 22], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 31, 13], ["-", 0, 43, 49, 50, 51, 16, 31, 16, 12, 22], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 12, 22]]
1
99
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { int R; scanf("%d", &R); printf("%lf", R * 3.1415); return 0; }
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { int R; scanf("%d", &R); printf("%f", 2 * R * 3.1415926535); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 31, 13], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 17, 48], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
0
42
#include <bits/stdc++.h> using namespace std; using ll = long long; using VI = vector<int>; using VL = vector<ll>; using VS = vector<string>; using VVI = vector<VI>; using VVL = vector<VL>; using PII = std::pair<int, int>; using PLL = std::pair<ll, ll>; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define re...
#include <bits/stdc++.h> using namespace std; using ll = long long; using VI = vector<int>; using VL = vector<ll>; using VS = vector<string>; using VVI = vector<VI>; using VVL = vector<VL>; using PII = std::pair<int, int>; using PLL = std::pair<ll, ll>; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep...
[["-", 36, 36, 36, 36, 0, 30, 0, 58, 0, 148], ["-", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22]]
1
831
import math as m r = int(input()) print(r*m.pi)
import math as m r = int(input()) print(2*r*m.pi)
[["+", 0, 652, 3, 4, 0, 657, 31, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 48]]
5
20
#include <algorithm> #include <cmath> //abs()かfabs()で少数絶対値 #include <cstdlib> //abs()で整数絶対値 #include <functional> //sort第三引数greater<型名>()で降順 #include <iomanip> //cout<<setw(数字) で空白による桁揃え #include <iostream> //cout<<right で右揃え #include <queue> #include <string> #include <vector> using namespace std; using ...
#include <algorithm> #include <cmath> //abs()かfabs()で少数絶対値 #include <cstdlib> //abs()で整数絶対値 #include <functional> //sort第三引数greater<型名>()で降順 #include <iomanip> //cout<<setw(数字) で空白による桁揃え #include <iostream> //cout<<right で右揃え #include <queue> #include <string> #include <vector> using namespace std; using ...
[["+", 0, 16, 31, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
58
n = int(input()) import math print(2*math.pi()*n)
n = int(input()) import math print(2*math.pi*n)
[["-", 0, 657, 31, 657, 12, 652, 3, 4, 0, 24], ["-", 0, 657, 31, 657, 12, 652, 3, 4, 0, 25]]
5
22
#include <algorithm> #include <cmath> #include <cstdlib> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <string> #include <utility> #include <vector> using namespace std; using ll = long long; const int MOD = 1000000007; /* struct mint { int x; mint(int x = 0) :x((x%...
#include <algorithm> #include <cmath> #include <cstdlib> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <string> #include <utility> #include <vector> using namespace std; using ll = long long; const int MOD = 1000000007; /* struct mint { int x; mint(int x = 0) :x((x%...
[["+", 0, 1, 0, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 1, 0, 16, 12, 16, 31, 16, 17, 48], ["-", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13]]
1
56
from math import pi i = input() print(float(i) * pi)
from math import pi i = input() print(float(i) * pi * 2)
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 48], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
18
print(int(input) * 3.1415 * 2)
print(int(input()) * 3.1415 * 2)
[["+", 31, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 31, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
11
#include <algorithm> #include <bits/stdc++.h> #include <cstdlib> #include <iostream> #include <math.h> #include <stdio.h> #include <string> #include <vector> using namespace std; using ll = long long; const int INF = 1e9 + 5; void print_vector2(vector<vector<ll>> v) { for (ll i = 0; i < v.size(); i++) { for (ll ...
#include <algorithm> #include <bits/stdc++.h> #include <cstdlib> #include <iostream> #include <math.h> #include <stdio.h> #include <string> #include <vector> using namespace std; using ll = long long; const int INF = 1e9 + 5; void print_vector2(vector<vector<ll>> v) { for (ll i = 0; i < v.size(); i++) { for (ll ...
[["-", 0, 16, 12, 16, 31, 16, 31, 16, 31, 22], ["+", 0, 16, 12, 16, 31, 16, 31, 16, 31, 13]]
1
246
#include <bits/stdc++.h> using namespace std; #define FOR(i, o, n) for (auto i = (o); (i) < (n); ++(i)) #define FOR1(i, n) FOR(i, 1, n + 1) #define REP(i, n) FOR(i, 0, n) #define REPR(i, n) for (auto i = (n)-1; (i) >= 0; --i) #define REPI(itr, v) for (auto itr = v.begin(); itr != v.end(); ++itr) #define REPIR(itr, v) f...
#include <bits/stdc++.h> using namespace std; #define FOR(i, o, n) for (auto i = (o); (i) < (n); ++(i)) #define FOR1(i, n) FOR(i, 1, n + 1) #define REP(i, n) FOR(i, 0, n) #define REPR(i, n) for (auto i = (n)-1; (i) >= 0; --i) #define REPI(itr, v) for (auto itr = v.begin(); itr != v.end(); ++itr) #define REPIR(itr, v) f...
[["+", 0, 16, 31, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]]
1
120
import math R = int(intput()) print(2*math.pi*R)
import math R = (int)(input()) print(2*math.pi*R)
[["+", 0, 1, 0, 662, 12, 652, 63, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 63, 23, 0, 25], ["-", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22]]
5
20
#include <bits/stdc++.h> #include <cstdlib> #include <malloc.h> using namespace std; //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tr_policy.hpp> // using namespace __gnu_pbds; #define ll long long #define double long double #define pb push_back #define endl '\n' #define F first #define S second #de...
#include <bits/stdc++.h> #include <cstdlib> #include <malloc.h> using namespace std; //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tr_policy.hpp> // using namespace __gnu_pbds; #define ll long long #define double long double #define pb push_back #define endl '\n' #define F first #define S second #de...
[["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
138
#include <bits/stdc++.h> #define pi 3.141592654 using namespace std; int main() { int n, m, a, sum = 0; cin >> n >> m; for (int i = 0; i < n; i++) { cin >> a; sum += a; } if (sum > n) cout << "-1" << endl; else cout << (n - sum) << endl; return 0; }
#include <bits/stdc++.h> #define pi 3.141592654 using namespace std; int main() { int n, m, a, sum = 0; cin >> n >> m; for (int i = 0; i < m; i++) { cin >> a; sum += a; } if (sum > n) cout << "-1" << endl; else cout << (n - sum) << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
84
N, M = map(int, input().split()) A = list(map(int, input().split())) if N - sum(A) > 0: days = N- sum(A) else: days = 0 print(days)
N, M = map(int, input().split()) A = list(map(int, input().split())) if N - sum(A) >= 0: days = N - sum(A) else: days = -1 print(days)
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["-", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 8, 196, 0, 1, 0, 662, 12, 664, 17, 33], ["+", 8, 196, 0, 1, 0, 662, 12, 664, 28, 612]]
5
60
#include <iostream> using namespace std; #define pi 3.14159 int main() { int N, M; cin >> N >> M; int ans = 0; for (int i = 0; i < M; i++) { int a; cin >> a; ans += a; } ans = (ans - N) * (-1); if (ans > 0) { cout << ans << endl; } else { cout << -1 << endl; } return 0; }
#include <iostream> using namespace std; #define pi 3.14159 int main() { int N, M; cin >> N >> M; int ans = 0; for (int i = 0; i < M; i++) { int a; cin >> a; ans += a; } ans = (ans - N) * (-1); if (ans >= 0) { cout << ans << endl; } else { cout << -1 << endl; } return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
96
#include <bits/stdc++.h> using namespace std; inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } typedef long long ll; typedef vector<int> VI; typedef vector<VI> VVI; typedef...
#include <bits/stdc++.h> using namespace std; inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } typedef long long ll; typedef vector<int> VI; typedef vector<VI> VVI; typedef...
[["-", 0, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 13]]
1
444
package main import ("fmt" "strings" "bufio" "os" "strconv" ) func main (){ n,m,an:=0,0,0 fmt.Scanf("%d %d", &n,&m) sc:=bufio.NewScanner(os.Stdin) sc.Scan() ins:=strings.Split(sc.Text(), " ") //in:=[]int for _, i := range ins{ j,_:=strconv.Atoi(i) //in=append...
package main import ("fmt" "strings" "bufio" "os" "strconv" ) func main (){ n,m,an:=0,0,0 fmt.Scanf("%d %d", &n,&m) sc:=bufio.NewScanner(os.Stdin) sc.Scan() ins:=strings.Split(sc.Text(), " ") //in:=[]int for _, i := range ins{ j,_:=strconv.Atoi(i) //in=append...
[["+", 8, 196, 0, 57, 15, 16, 12, 16, 31, 22], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 17, 33]]
7
146
N,M=list(map(int, input().split())) A=list(map(int, input().split())) ans=sum(A) if N<ans: print('-1') else: print(M-ans)
N,M=list(map(int, input().split())) A=list(map(int, input().split())) ans=sum(A) if N<ans: print('-1') else: print(N-ans)
[["-", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22]]
5
61
N,M = map(int(input().split())) A = list(map(int(input().split()))) sumA = sum(A) if N-sumA < 0: print(-1) else: print(N-sumA)
N,M = map(int,input().split()) A = list(map(int,input().split())) sumA = sum(A) if N-sumA < 0: print(-1) else: print(N-sumA)
[["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 21]]
5
61
import numpy as np n, m = map(int, input().split()) lists = list(map(int, input().split())) arr = np.array(lists) days = arr.sum() if days >= 0: print(int(n - days)) else: print('-1')
import numpy as np n, m = map(int, input().split()) lists = list(map(int, input().split())) arr = np.array(lists) days = arr.sum() if n - days >= 0: print(int(n - days)) else: print('-1')
[["+", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 33]]
5
74
N,M = map(int,input().split()) A = sum(map(int,input().split())) print(N-A if N<=A else -1)
N,M = map(int,input().split()) A = sum(map(int,input().split())) print(N-A if N>=A else -1)
[["-", 0, 652, 3, 4, 0, 41, 0, 666, 667, 19], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 20]]
5
46
N,M = (int(x) for x in input.split()) hw = [int(x) for x in input().split()] hwsum = 0 for n in range(len(hw)-1): hwsum += hw[n] if hwsum<=N: print(N-hwsum) else: print(-1)
N,M = (int(x) for x in input().split()) hw = [int(x) for x in input().split()] hwsum = 0 for n in range(len(hw)): hwsum += hw[n] if hwsum<=N: print(N-hwsum) else: print(-1)
[["+", 12, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["+", 12, 652, 63, 319, 500, 652, 3, 4, 0, 25], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
76
# N: 夏休みの日数,M: 宿題の数 N, M = list(map(int, input().split())) # i番目の宿題にかかる日数 A = list(map(int, input().split())) free_days = N - sum(A) if (free_days > 0): print(free_days) else : print(-1)
# N: 夏休みの日数,M: 宿題の数 N, M = list(map(int, input().split())) # i番目の宿題にかかる日数 A = list(map(int, input().split())) free_days = N - sum(A) if (free_days >= 0): print(free_days) else : print(-1)
[["-", 0, 656, 0, 57, 15, 23, 0, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 23, 0, 666, 667, 20]]
5
64
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) using namespace std; using ll = long long; using p = pair<int, int>; using Graph = vector<vector<int>>; const double PI = acos(-1); int main() { int N, M; cin >> N >> M; int a, sum = 0; rep(i, M) { cin >> a; sum += a; } ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) using namespace std; using ll = long long; using p = pair<int, int>; using Graph = vector<vector<int>>; const double PI = acos(-1); int main() { int N, M; cin >> N >> M; int a, sum = 0; rep(i, M) { cin >> a; sum += a; } ...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22]]
1
126
#include <stdio.h> int main() { int N, M; int A[10001]; int sum = 0; scanf("%d %d", &N, &M); for (int i = 0; i < M; i++) { scanf("%d", &A[i]); sum += A[i]; } if (sum < N) { printf("%d", N - sum); } else { printf("-1"); } }
#include <stdio.h> int main() { int N, M; int A[10001]; int sum = 0; scanf("%d %d", &N, &M); for (int i = 0; i < M; i++) { scanf("%d", &A[i]); sum += A[i]; } if (sum <= N) { printf("%d", N - sum); } else { printf("-1"); } }
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 19]]
0
102
import sys sys.setrecursionlimit(10 ** 9) # input = sys.stdin.readline #### def int1(x): return int(x) - 1 def II(): return int(input()) def MI(): return map(int, input().split()) def MI1(): return map(int1, input().split()) def LI(): return list(map(int, input().split())) def LI1(): return list(map(int1, input().sp...
import sys sys.setrecursionlimit(10 ** 9) # input = sys.stdin.readline #### def int1(x): return int(x) - 1 def II(): return int(input()) def MI(): return map(int, input().split()) def MI1(): return map(int1, input().split()) def LI(): return list(map(int, input().split())) def LI1(): return list(map(int1, input().sp...
[["-", 0, 652, 3, 4, 0, 41, 0, 666, 667, 60], ["-", 3, 4, 0, 41, 0, 666, 0, 664, 17, 33], ["-", 3, 4, 0, 41, 0, 666, 0, 664, 28, 612], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 18], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 0, 612]]
5
267
#include <bits/stdc++.h> using namespace std; #define int long long #define double long double #define fo(a, b) for (int a = 0; a < b; a++) #define Sort(a) sort(a.begin(), a.end()) #define rev(a) reverse(a.begin(), a.end()) #define fi first #define se second #define sz size() #define bgn begin() #define en end() #defin...
#include <bits/stdc++.h> using namespace std; #define int long long #define double long double #define fo(a, b) for (int a = 0; a < b; a++) #define Sort(a) sort(a.begin(), a.end()) #define rev(a) reverse(a.begin(), a.end()) #define fi first #define se second #define sz size() #define bgn begin() #define en end() #defin...
[["-", 0, 1, 0, 11, 31, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 11, 31, 2, 3, 4, 0, 22]]
1
3,160
#include <bits/stdc++.h> using namespace std; #define froop1(a, n) for (int i = a; i < n; i++) #define froop2(a, n) for (int i = a; i > n; i--) int main() { int N, limit; cin >> limit >> N; int sum = 0; froop1(0, N) { int a; cin >> a; sum += 1; } if (limit < sum) { cout << -1 << endl; } e...
#include <bits/stdc++.h> using namespace std; #define froop1(a, n) for (int i = a; i < n; i++) #define froop2(a, n) for (int i = a; i > n; i--) int main() { int N, limit; cin >> limit >> N; int sum = 0; froop1(0, N) { int a; cin >> a; sum += a; } if (limit < sum) { cout << -1 << endl; } e...
[["-", 8, 9, 0, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 9, 0, 1, 0, 11, 12, 22]]
1
92
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; int a[10100]; int total = 0; for (int i = 0; i < m; i++) { cin >> a[i]; total += a[i]; } if (total >= n) cout << -1 << endl; else cout << n - total << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; int a[10100]; int total = 0; for (int i = 0; i < m; i++) { cin >> a[i]; total += a[i]; } if (total > n) cout << -1 << endl; else cout << n - total << endl; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]]
1
85
def main(): N, M = map(int, input().split()) A = list(map(int, input().split(' '))) homework_day = 0 for i in range(2): homework_day = homework_day + A[i] if homework_day > N: print(-1) else: print(N - homework_day) main()
def main(): N, M = map(int, input().split()) A = list(map(int, input().split(' '))) homework_day = 0 for i in range(len(A)): homework_day = homework_day + A[i] if homework_day > N: print(-1) else: print(N - homework_day) main()
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
81
n, m = map(int, input().split()) a = list(map(int, input().split())) if sum(a) > n: print(-1) else: print(sum(a) - n)
n, m = map(int, input().split()) a = list(map(int, input().split())) if sum(a) > n: print(-1) else: print(n - sum(a))
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]]
5
57
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; using P = pair<int, int>; using ll = long long; int main() { int n, m; int x; cin >> n >> m; rep(i, m) { cin >> m; if (n - m < 0) { cout <...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; using P = pair<int, int>; using ll = long long; int main() { int n, m; int x; cin >> n >> m; rep(i, m) { cin >> x; if (n - x < 0) { cout <...
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22]]
1
104
n, m = map(int, input().split()) a = list(map(int, input().split())) print(n - sum(a) if n - sum(a) else '-1')
n, m = map(int, input().split()) a = list(map(int, input().split())) print(n - sum(a) if 0 <= n - sum(a) else '-1')
[["+", 0, 652, 3, 4, 0, 41, 0, 666, 0, 612], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 19]]
5
53
n, m = map(int, input().split()) l=list(map(int, input().split())) ans= n-sum(l) if ans>0: print(ans) else: print(-1)
n, m = map(int, input().split()) l=list(map(int, input().split())) ans= n-sum(l) if ans>=0: print(ans) else: print(-1)
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20]]
5
57
#include <cstdio> using namespace std; int main() { int n, m, a, i, x; x = 0; scanf("%d %d", &n, &m); for (i = 0; i < m; i++) { scanf("%d", &a); x += a; } n -= x; if (n <= 0) printf("-1\n"); else printf("%d\n", n); return 0; }
#include <cstdio> using namespace std; int main() { int n, m, a, i, x; x = 0; scanf("%d %d", &n, &m); for (i = 0; i < m; i++) { scanf("%d", &a); x += a; } n -= x; if (n < 0) printf("-1\n"); else printf("%d\n", n); return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]]
1
101
arr = list(map(int, input().split())) ais = list(map(int, input().split())) days,tasks = arr[0],arr[1] def main(days, ais): sum = 0 for i in ais: sum += 0 if sum > days: return -1 return days - sum print(main(days, ais))
arr = list(map(int, input().split())) ais = list(map(int, input().split())) days,tasks = arr[0],arr[1] def main(days, ais): sum = 0 for i in ais: sum += i if sum > days: return -1 return days - sum print(main(days, ais))
[["-", 0, 7, 8, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 12, 22]]
5
87
#include <bits/stdc++.h> using namespace std; // Author: Ezio Sam /* Shorthands */ #define ll long long #define pb push_back #define mp make_pair #define sp ": " #define cs "Case " #define fi first #define sn second #define po(x) x *x #define pi 3.14159 /* STL */ #define vi vector<int> v #define pii pair<int, int> #def...
#include <bits/stdc++.h> using namespace std; // Author: Ezio Sam /* Shorthands */ #define ll long long #define pb push_back #define mp make_pair #define sp ": " #define cs "Case " #define fi first #define sn second #define po(x) x *x #define pi 3.14159 /* STL */ #define vi vector<int> v #define pii pair<int, int> #def...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]]
1
201
#include <bits/stdc++.h> #include <math.h> #define _GLIBCXX_DEBUG using namespace std; int main() { int N, M; cin >> N >> M; vector<int> vec(M); for (int i = 0; i < M; i++) { cin >> vec[i]; } int sum = 0; for (int i = 0; i < N; i++) { sum += vec[i]; } if (sum <= N) { cout << N - sum << ...
#include <bits/stdc++.h> #include <math.h> #define _GLIBCXX_DEBUG using namespace std; int main() { int N, M; cin >> N >> M; vector<int> vec(M); for (int i = 0; i < M; i++) { cin >> vec[i]; } int sum = 0; for (int i = 0; i < M; i++) { sum += vec[i]; } if (sum <= N) { cout << N - sum << ...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
114
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL << 62 #define inf 1000000007 #define _USE_MATH_DEFINES #include <math.h> int main() { ll n, m; cin >> n >> m; ll sum = 0; for (ll i = 0; i < m; i++) { ll now; cin >> now; sum += now; } if (sum < n) { cout << ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL << 62 #define inf 1000000007 #define _USE_MATH_DEFINES #include <math.h> int main() { ll n, m; cin >> n >> m; ll sum = 0; for (ll i = 0; i < m; i++) { ll now; cin >> now; sum += now; } if (sum <= n) { cout <<...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
95
function main(input) { input = input.trim(); var list1 = input.split("\n")[0].split(" "); var list = input.split("\n")[1].split(" "); for (var i = 0; i < list.length; i++) { list[i] = parseInt(list[i]); } var nissuu = parseInt(list1[0]); var sKei = 0; for (var i = 0; i < list.length; i++) { sK...
function main(input) { input = input.trim(); var list1 = input.split("\n")[0].split(" "); var list = input.split("\n")[1].split(" "); for (var i = 0; i < list.length; i++) { list[i] = parseInt(list[i]); } var nissuu = parseInt(list1[0]); var sKei = 0; for (var i = 0; i < list.length; i++) { sKe...
[["-", 0, 1, 0, 2, 3, 3, 0, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 3, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 3, 0, 16, 12, 22], ["+", 8, 556, 0, 1, 0, 2, 3, 3, 0, 22]]
2
181