s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s884146940 | p03597 | u465246274 | 1566061438 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 34 | n = int(input())
print((n*n) - a) |
s545814648 | p03597 | u465246274 | 1566061395 | Python | Python (3.4.3) | py | Runtime Error | 20 | 2940 | 35 | n = int(input())
print((n**n) - a) |
s423710622 | p03597 | u917518913 | 1565932599 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 33 | N=input[]
A=input[]
print(N**2-A) |
s772420254 | p03597 | u142277735 | 1565894472 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3576 | 8505 | import numpy as np
import sys
sys.setrecursionlimit(4100000)
def sign(string):
if not isinstance(string, np.str_)|isinstance(string, str):
return type(string)
if string=="SE":
return -1
elif string=="ES":
return 1
def reverse(array):
if not isinstance(array[0], np.str_)|isinsta... |
s343993174 | p03597 | u821251381 | 1565762868 | Python | Python (3.4.3) | py | Runtime Error | 19 | 2940 | 42 | N,A = open(0).read().split()
print(N**2-A) |
s786974996 | p03597 | u256464928 | 1565728134 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 46 | N,A = map(int,input().split())
print((N**N)-A) |
s451222337 | p03597 | u111365362 | 1565534447 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 57 | #10:40
n,a = map(int,input().split())
print ( n * n - a ) |
s757695340 | p03597 | u302292660 | 1564813081 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 49 | n = int(input())
a = int(input())
print(N**2 - a) |
s471989423 | p03597 | u871841829 | 1564800835 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 104 | a, b, c = map(int, input().split())
if a == b:
print(c)
elif a == c:
print(b)
else:
print(a) |
s297405462 | p03597 | u882359130 | 1564788267 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 166 | #include <iostream>
using namespace std;
int main(){
int N, A;
cin >> N;
cin >> A;
int M;
M = N * N;
int ans;
ans = M - A;
cout << ans;
return 0;
} |
s528416577 | p03597 | u514894322 | 1564330085 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 44 | n,a = map(int,input().split())
print(n**2-a) |
s078826078 | p03597 | u324549724 | 1563925816 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 126 | n, k = int(input()), int(input())
a = map(int, input().split())
sum = 0
for x in a :
sum += min(x, abs(k-x)) * 2
print(sum)
|
s640939195 | p03597 | u363995337 | 1563157629 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38512 | 306 | import sys
N = int(input())
a = list(map(int,input().split()))
if a[0] != a[len(a)-1]^a[1]:
print('No')
sys.exit()
for i in range(1,N-1):
if a[i] != a[i-1]^a[i+1]:
print('No')
sys.exit()
if a[len(a)-1] != a[len(a)-2]^a[0]:
print('No')
sys.exit()
print('Yes')
|
s613657710 | p03597 | u363995337 | 1563157578 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38640 | 306 | import sys
N = int(input())
a = list(map(int,input().split()))
if a[0] != a[len(a)-1]^a[1]:
print('No')
sys.exit()
for i in range(1,N-1):
if a[i] != a[i-1]^a[i+1]:
print('No')
sys.exit()
if a[len(a)-1] != a[len(a)-2]^a[0]:
print('No')
sys.exit()
print('Yes')
|
s668384037 | p03597 | u543894008 | 1562120644 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 835 | A, B, C, D, E, F = map(int, input().split())
maxStrength = 0
ansMass = 100*A
ansSugar = 0
for i in range(100*A, F+1, 100*A):
for j in range(0, F-i+1, 100*B):
for k in range(0, F-i-j+1, C):
for l in range(0, F-i-j-k+1, D):
a = i + j
... |
s579214531 | p03597 | u633914031 | 1562048500 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 689 | A,B,C,D,E,F=map(int, input().split())
cnt_A=0
cnt_B=0
cnt_C=0
cnt_D=0
max_noudo=0
water=A*100
sugar=0
while cnt_A*100*A <= F:
cnt_B=0
while cnt_B*100*B <= F-cnt_A*100*A:
cnt_C=0
while cnt_C*C <= F-cnt_A*100*A-cnt_B*100*B:
cnt_D=0
while cnt_D*D <= F-cnt_A*100*A-cnt_B*100*B-cnt_C*C:
if (cn... |
s882055982 | p03597 | u633914031 | 1562048463 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 689 | A,B,C,D,E,F=map(int, input().split())
cnt_A=0
cnt_B=0
cnt_C=0
cnt_D=0
max_noudo=0
water=A*100
sugar=0
while cnt_A*100*A <= F:
cnt_B=0
while cnt_B*100*B <= F-cnt_A*100*A:
cnt_C=0
while cnt_C*C <= F-cnt_A*100*A-cnt_B*100*B:
cnt_D=0
while cnt_D*D <= F-cnt_A*100*A-cnt_B*100*B-cnt_C*C:
if (cn... |
s204891440 | p03597 | u770077083 | 1560526408 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 40 | n = int(input())**2
print(n-int(input()) |
s189917798 | p03597 | u748311048 | 1560381617 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 32 | N=input();A=input()
print(N*N-A) |
s770135206 | p03597 | u263830634 | 1560199129 | Python | PyPy3 (2.4.0) | py | Runtime Error | 164 | 38256 | 1109 | import sys
A, B, C, D, E, F = map(int, input().split())
def concentration(water, suger):
if water * E/100 < suger or water + suger == 0:
return 0
return (100 * suger/(water + suger))
lst_w = []
limit_w = (F+A*100-1)//(A*100)
for i in range(limit_w):
for j in range(limit_w):
if 100 * (A * ... |
s251726804 | p03597 | u569272329 | 1560148053 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 47 | N, A = map(int, input().split())
print(N**2-A)
|
s264582233 | p03597 | u569272329 | 1560148013 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 51 | N, A = map(int, input().split())
print(N ** 2 - A)
|
s127820629 | p03597 | u569272329 | 1560147905 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 51 | N, A = map(int, input().split())
print(N ** 2 - A)
|
s941838830 | p03597 | u569272329 | 1560147843 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 51 | N, A = map(int, input().split())
print(N ** 2 - A)
|
s967124742 | p03597 | u663014688 | 1558832809 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 157 | age, price = map(int, input().split())
ans = 0
if age <= 5:
ans = 0
elif age >= 6 and age <= 12:
ans = price // 2
else:
ans = price
print(ans) |
s695180564 | p03597 | u367130284 | 1558569313 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1074 | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef vector<vector<int> > Matrix;
const int INF = 100000000;
Matrix d; // グラフの距離を格納した2次元配列(隣接行列)
Matrix D; // d[u][v]は辺e=(u,v)のコスト(辺が存在しない場合はINF、ただしd[i][i]=0)
void warshall_floyd(int n) { // nは頂点数
for (int i = 0; i < n; i++) //... |
s535406025 | p03597 | u910295650 | 1558297027 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 124 | s = input().split()
if s.count('5') == 2 and s.count('7') == 1:
print('YES')
else:
print('NO') |
s142828933 | p03597 | u620945921 | 1558060450 | Python | PyPy3 (2.4.0) | py | Runtime Error | 170 | 38256 | 504 | A, B, C, D, E, F= (int(i) for i in input().split())
dens=0
for a in range(30+1):
for b in range(30+1):
waterA=100*a*A
waterAB=waterA+100*b*B
if waterA<= F and 0 < waterAB <= F:
for c in range(100+1):
for d in range(100+1):
if waterAB+c*C+d*D <= F:
if c*C+d*D <= (a*A+b... |
s185081017 | p03597 | u724742135 | 1557892289 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 254 | from sys import stdin
N = int(stdin.readline().rstrip())
K = int(stdin.readline().rstrip())
X = [int(_) for _ in stdin.readline().rstrip().split()]
ans = 0
for i in x:
if i < K - i:
ans += 2 * i
else:
ans += 2 * (K - i)
print(ans) |
s705569280 | p03597 | u724742135 | 1557892226 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 256 | from sys import stdin
N = int(stdin.readline().rstrip())
K = int(stdin.readline().rstrip())
X = [int(_) for _ in stdin.readline().rstrip().split()]
ans = 0
for i in x:
if i < K - i:
ans += 2 * i
else:
ans += 2 * (K - i)
print(route) |
s513528156 | p03597 | u518042385 | 1557204544 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 482 | a,b,c,d,e,f=map(int,input().split())
l=[]
for i in range(0,f//(100*a)+1):
for j in range(0,f//(100*b)+1):
if 100*a*i+100*b*j>=f:
pass
else:
l.append(100*a*i+100*b*j)
l1=[]
del l[0]
max1=0
g=0
h=0
for i in l:
l2=[]
m=min(f-i,(i//100)*e)
max2=0
for j in range(0,m//c+1):
for k in range(0,... |
s028811408 | p03597 | u532966492 | 1557158582 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 49 | N,A = [input() for _ in range(2)]
print(N**2 - A) |
s099215005 | p03597 | u903722008 | 1557023060 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 565 | a=input().split()
n = int(a[0])
m = int(a[1])
white=[]
black=[]
b = []
for i in range(n):
b.append(input())
for i in range(n):
for j in range(m):
if b[i][j] == '.':
white.append([i,j])
else:
black.append([i,j])
max_d=0
l_white = len(white)
l_black = len(black)
for i i... |
s050592551 | p03597 | u041075929 | 1556651907 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 182 | import sys, os
f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
sys.stdin = open('./input.txt', 'r')
def solve():
n,a = f()
print(n*n - a)
solve()
|
s483728542 | p03597 | u102461423 | 1556604733 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 43 | n,a = map(int,input().split())
print(n*n-a) |
s706947324 | p03597 | u055941944 | 1556332330 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 158 | # -*- coding utf-8 -*-
n=int(input())
k=int(input())
x=list(map(int,input().split()))
ans=0
for i in range(n):
ans+=min(x[i],abs(k-x[i]))
print(ans*2)
|
s006882629 | p03597 | u794603719 | 1556155389 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 38 | a=int(input())
print(a**2-int(input()) |
s120462613 | p03597 | u268516119 | 1555960028 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 37 | N=int(input)
print(N**2-int(input())) |
s566900884 | p03597 | u442030035 | 1555939891 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 49 | N = int(input())
A = int(inout())
print(N**2 - A) |
s088087767 | p03597 | u059210959 | 1555303080 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 528 | //encoding:utf-8
//#include <iostream> //c++
//#include<stack> //スタックに関して 最新のデータから捨てる
//#include<queue> //キューに関して 最古のデータから捨てる
//#include<math.h>
//#include<vector>
//#include<algorithm> //sort とかにいる
#include<bits/stdc++.h>//vector,algorithm,que
#include<time.h> //時間にかんして
#define ll long long
#define MOD 1000000007
usi... |
s854189839 | p03597 | u172493590 | 1554870941 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 47 | n = input()
a = inout()
print(int(n ** 2) - a) |
s607327899 | p03597 | u288040231 | 1554718695 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 50 | N, A = int(input().split())
B = N * N - A
print(B) |
s128330964 | p03597 | u288040231 | 1554718644 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 55 | N, A = map(int, input().split())
B = N * N - A
print(B) |
s873402522 | p03597 | u288040231 | 1554718476 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 54 | N,A = map(int, input().split())
B = N * N - A
print(B) |
s327083552 | p03597 | u288040231 | 1554718420 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 49 | N,A = int(input().split())
B = N * N - A
print(B) |
s991380203 | p03597 | u565204025 | 1554170011 | Python | PyPy3 (2.4.0) | py | Runtime Error | 170 | 38512 | 726 | # -*- coding: utf-8 -*-
a,b,c,d,e,f = map(int,input().split())
max_water = f // 100 * a
max_sugar = f // c
water = []
for i in range(max_water):
for j in range(max_water):
water.append(100*a*i+100*b*j)
sugar = []
for i in range(max_sugar):
for j in range(max_sugar):
sugar.append(c*i+d*j)
an... |
s017244888 | p03597 | u565204025 | 1554167650 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 75 | # -*- coding: utf-8 -*-
n = int(input(n))
a = int(input(a))
print(n*n-a)
|
s516304240 | p03597 | u565204025 | 1554167608 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 65 | # -*- coding: utf-8 -*-
n = input(n)
a = input(a)
print(n*n-a)
|
s997860152 | p03597 | u374103100 | 1554086633 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3316 | 218 | # https://atcoder.jp/contests/abc074/tasks/abc074_a
import itertools
import collections
import bisect
def main():
N = int(input())
A = int(input())
print(N * N - a)
if __name__ == '__main__':
main()
|
s540024728 | p03597 | u835628599 | 1553709277 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 77 | num1,num2=input().split()
num1=int(num1)
num2=int(num2)
print(num1*num1-num2) |
s943827499 | p03597 | u393581926 | 1553621967 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 129 | n=int(input())
k=int(input())
x=list(map(int,input().split()))
a=0
for i in range(n):
a+=min(x[i]*2,(k-x[i])*2)
print(a)
|
s849027217 | p03597 | u246820565 | 1553565656 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 39 |
n = input()
a = input()
print(n**n-a) |
s701996103 | p03597 | u694810977 | 1552872101 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 38 | N = input()
A = input()
print((N*N)-A) |
s159894005 | p03597 | u694810977 | 1552872061 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 45 | N,A = map(int,input().split())
print((N*N)-A) |
s104970180 | p03597 | u859897687 | 1552852875 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 33 | print(int(input)**2-int(input())) |
s620982818 | p03597 | u219015402 | 1552792519 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 452 | N = int(input())
S = input()
used_list = []
num = 0
def DFS(i,used_list,num):
if i == N:
num += 1
return num
s = S[i]
# S[i]を使わない場合
num = DFS(i+1,used_list,num)
# S[i]を使う場合
if s not in used_list:
used_list.append(s)
num=DFS(i+1,used_list,num)
if len(us... |
s369651370 | p03597 | u848654125 | 1552189149 | Python | Python (3.4.3) | py | Runtime Error | 158 | 13260 | 467 | import scipy as sp
total_cost = 0
N, M = (map(int, input().split()))
A = sp.array(list(map(int, input().split())))
B = sp.array(list(map(int, input().split())))
AB_list = sp.stack([A, B]).T
AB = AB_list[:, AB_list[0,:].argsort()]
A_list = AB[0,:]
B_list = AB[1,:]
for i in range(N):
if B_list[i]<M:
M = ... |
s264468838 | p03597 | u403984573 | 1552097675 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 40 | N=int,input()
A=int,input()
print(N*N-A) |
s238756451 | p03597 | u403984573 | 1552097653 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 32 | N=input()
A=input()
print(N*N-A) |
s963384546 | p03597 | u403984573 | 1552097577 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 41 | N,A=map(int,input().split())
print(N*N-A) |
s316280757 | p03597 | u593005350 | 1551828164 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3064 | 378 | #ABC074C
A,B,C,D,E,F=map(int,input().split())
ans=-1
sw=100*A #SugarWater
s=0 #Sugar
for a in range(0,F+1,100*A):
for b in range(0,F-a+1,100*B):
if a+b!=0:
for c in range(0,F-a-b+1,C):
d=(E*(a+b)//100 -c)//D
d*=D
if d<0:
break
if 0<a+b+c+d<=F and 0<a+b:
if ans < (c+d)/(a+b+c+d):
an... |
s413137362 | p03597 | u593005350 | 1551828095 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 378 | #ABC074C
A,B,C,D,E,F=map(int,input().split())
ans=-1
sw=100*A #SugarWater
s=0 #Sugar
for a in range(0,F+1,100*A):
for b in range(0,F-a+1,100*B):
if a+b!=0:
for c in range(0,F-a-b+1,C):
d=(E*(a+b)//100 -c)//D
d*=D
if d<0:
break
if 0<a+b+c+d<=F and 0<a+b:
if ans < (c+d)/(a+b+c+d):
an... |
s623808324 | p03597 | u272682534 | 1551321504 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 357 | def get_num():
n = int(input())
w = int(input())
return n,w
def check_range(n,w):
return n in range(1,101) and w in range(n**2)
def black_tiles(n,w):
if (check_range(n,w)):
return n**2 - w
else:
raise Exception('Value out of range')
if (__name__=='__main__'):
n,w = get_n... |
s224263942 | p03597 | u272682534 | 1551320785 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 342 | def get_num():
n = int(input())
w = int(input())
return n,w
def check_range(n,w):
return n in range(1,101) and w in range(n**2)
def black_tiles(n,w):
if (check_range(n,w)):
return n**2 - w
else:
raise Exception('Value out of range')
if (__name__=='__main__'):
print(black_t... |
s099194485 | p03597 | u864667985 | 1551294736 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 43 | n,a=map(int, input().split());print(n**2-a) |
s491022793 | p03597 | u766684188 | 1550550720 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 25 | print(input()**2-input()) |
s097896235 | p03597 | u766684188 | 1550550667 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 42 | n,a=map(int,input().split())
print(n**2-a) |
s116468979 | p03597 | u813450934 | 1550388546 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3076 | 465 | n = int(input())
l = list(map(int, input().split()))
def memo(n) :
me = [-1]*(n+1)
global l
def f(n) :
if n == 0 :
return 0
elif n == 1 :
return abs(l[0] - l[1])
else :
if me[n] != -1 :
return me[n]
else :
... |
s113549307 | p03597 | u584174687 | 1545534918 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3316 | 961 |
import collections
def get_lim(n):
# for i in range(n):
# if i * i > n:
# return i + 1
return pow(10, int((len(str(n)) / 2)))
def prime_factor(n, length):
ass = collections.defaultdict(int)
# break_num = pow()
# for i in range(2,int(n**0.5)+1):
lim = get_lim(n)
for i i... |
s186868069 | p03597 | u059210959 | 1545532493 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 222 | #encoding:utf-8
import math
import sympy
N,P = map(int,input().split())
facters = sympy.factorint(P)
ans = 1
for key in facters.keys():
if facters[key]/N >= 1:
ans *= key**(facters[key]//N)
print(int(ans))
|
s923844146 | p03597 | u272377260 | 1544849339 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 52 | n, a = [int(input) for _ in range(2)]
print(n*n - a) |
s916412727 | p03597 | u299840026 | 1539480990 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 397 | def gcd(a, b):
while b:
a, b = b, a % b
return a
def lcm(x, y):
return (x * y) // gcd(x, y)
M, N = map(int, input().split())
S = input()
T = input()
MA = [S[0]]
NA = [T[0]]
L = lcm(M, N)
m = L/M
n = L/N
for i in range(M):
if i % n == 0:
MA.append(S[i])
for i in range(N):
if i % m == 0:
... |
s154760334 | p03597 | u790877102 | 1538620486 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 52 | N,A = map(int,input().split())
M = N*N-A
print(M)
|
s149236855 | p03597 | u790877102 | 1538620427 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 45 | N,A = map(int,input().split())
print(N**2-A) |
s784636337 | p03597 | u484460274 | 1538288489 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 34 | print(int(input()**2-int(input())) |
s033922659 | p03597 | u391475811 | 1533783102 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 41 | N=int(input())
A=int(input)
print(N*N-A) |
s126373360 | p03597 | u963903527 | 1532122966 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 802 | def solve():
A, B, C, D, E, F = map(int, input().split())
memo = {}
for a in range(31):
for b in range(31):
for c in range(101):
for d in range(101):
w = (100*A)*a + (100*B)*b
s = C*c + D*d
if w ==0:
... |
s670856781 | p03597 | u278864208 | 1530919145 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 717 | A,B,C,D,E,F= map(int, input().split())
res_dict = {}
x_list = []
for i in range(F // A + 1):
for j in range((F - 100 * A * i) // B + 1):
x = 100 * (i * A + j * B)
if x <= F:
x_list.append(x)
x_uniq = list(set(x_list))
for x in x_uniq:
for i in range((F - x) // C + 1):
for j i... |
s215304168 | p03597 | u443569380 | 1530300553 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 130 | N = int(input())
K = int(input())
x = list(map(int,input().split()))
cnt = 0
for i in x:
cnt += 2 * min(i,K - i)
print(cnt)
|
s860157461 | p03597 | u603234915 | 1528297365 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 47 | print('{}'.format(int(input())**2-int(input())) |
s335978966 | p03597 | u657541767 | 1523562478 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 606 | a, b, c, d, e, f = map(int, input().split())
max_concentration = 0
for i in range(0, f + 1, 100 * a):
for j in range(0, f - i + 1, 100 * b):
if i == 0 and j == 0:
continue
y = min((i + j) * e // 100, f - i - j)
for k in range(0, y + 1, c):
for l in range(0, y - k + 1,... |
s236643953 | p03597 | u050428930 | 1522944984 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 16 | 1 2 10 20 15 200 |
s752455381 | p03597 | u581337384 | 1521910936 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 50 | N, M = map(int, input().split())
print(N * N - M)
|
s651125093 | p03597 | u899866687 | 1521684598 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 759 |
a,b,c,d,e,f=(int(i) for i in input().split())
w,s,num=set(),set(),0
ans=[0,0]
max_salt=int(e*f/((100+e)*1.0))
for i in range(((f-f%(a*100))//(a*100))+1):#//は切り捨て除算
#Aの何倍が最適かを網羅的に走査
for j in range(((f-f%(b*100))//(b*100))+1):
if i*a*100+j*b*100<=f:
w.add(i*a*100+j*b*100)
else:
... |
s391330101 | p03597 | u899866687 | 1521684528 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 698 |
a,b,c,d,e,f=(int(i) for i in input().split())
w,s,num=set(),set(),0
ans=[0,0]
max_salt=int(e*f/((100+e)*1.0))
for i in range(((f-f%(a*100))//(a*100))+1):
for j in range(((f-f%(b*100))//(b*100))+1):
if i*a*100+j*b*100<=f:
w.add(i*a*100+j*b*100)
else:
break
for i in range((max... |
s354239910 | p03597 | u729707098 | 1521524170 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 612 | a,b,c,d,e,f = (int(i) for i in input().split())
w,s,num,answer = set(),set(),0,[a*100,0]
for i in range((f-f%(a*100))//(a*100)+1):
for j in range((f-f%(b*100))//(b*100)+1):
if i*a*100+j*b*100 <= f:
w.add(i*a*100+j*b*100)
else:
break
smax = int(e*f/((100+e)*1.0))
for i in range((smax-smax%c)//c+1):
for j in ... |
s264831282 | p03597 | u019584841 | 1519851458 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 175 | n=int(input())
k=int(input())
l=[int(x) for x in input().split()]
s=0
for i in range(n):
if abs(l[i]-k)>abs(l[i]):
s+=abs(l[i])
else:
s+=abs(l[i]-k)
print(s*2)
|
s782618770 | p03597 | u319612498 | 1519061094 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 49 | n,a=(int(input() for i in range(2))
print(n**2-a) |
s833492556 | p03597 | u978494963 | 1517693356 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 67 | n,a = list(map(lambda x: int(x), input().split(" ")))
print(n**2-a) |
s538170456 | p03597 | u978494963 | 1517693280 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 67 | n,a = list(map(lambda x: int(x), input().split(" ")))
print(n**2-a) |
s523025561 | p03597 | u562016607 | 1517511376 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 880 | A, B, C, D, E, F = map(int, input().split())
def gcd(x, y):
xx = (abs(x+y)-abs(x-y)) // 2
yy = (abs(x+y)+abs(x-y)) // 2
if yy % xx == 0:
return xx
else:
return gcd(yy % xx, xx)
g = gcd(C, D)
Cmax = 0
Hmax = 0
Smax = 0
for p in range(F // (100*A) + 2):
for q in range((F - 100*p*A) /... |
s269047646 | p03597 | u562016607 | 1517507428 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 850 | A, B, C, D, E, F = map(int, input().split())
def gcd(x, y):
xx = (abs(x+y)-abs(x-y)) // 2
yy = (abs(x+y)+abs(x-y)) // 2
if yy % xx == 0:
return xx
else:
return gcd(yy % xx, xx)
g = gcd(C, D)
Cmax = 0
Hmax = 0
Smax = 0
for p in range(F // (100*A) + 2):
for q in range((F - 100*p*A) //... |
s525335821 | p03597 | u499259667 | 1516918599 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 43 | n,a=map(int,input().split())
print((n*n)-a) |
s731982082 | p03597 | u499259667 | 1516918534 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 42 | n,a=map(int,input().split())
print(n*n-a)
|
s490938410 | p03597 | u499259667 | 1516918271 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 43 | n,a=map(int,input().split())
print(n**2-a)
|
s881071003 | p03597 | u499259667 | 1516918068 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 40 | n,a=map(int,input().split)
print(n**2-a) |
s687945935 | p03597 | u534173972 | 1516063382 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 68 | N=int(input())
n,a=[int(input()) for i in range(N)]
print(n**n - a)
|
s719896419 | p03597 | u692814396 | 1514241973 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 46 | a,b = map(int,input().sp;lit())
print(a**2 -b) |
s850593562 | p03597 | u108377418 | 1513648130 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 1885 | """
N×N のマス目があります。
このマス目の各マスを白色または黒色に塗ることにしました (すべてのマスをどちらか片方の色に塗ります)。
ちょうど A マスを白色に塗るとき、黒色に塗ることになるマスはいくつあるでしょうか。
"""
"""
標準入力は以下の形式で与えられる
-------------------------------
N
A
"""
"""
N,Aの条件
------------------
1 <= N & N <= 100
0 <= A & A <= N**2
"""
"""
出力
-------... |
s580166201 | p03597 | u498401785 | 1511390621 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 42 | n = int(input())
print(n**2 - int(input()) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.