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
int64
0
100
memory
stringlengths
4
6
code_size
int64
15
14.7k
code
stringlengths
15
14.7k
problem_id
stringlengths
6
6
problem_description
stringlengths
358
9.83k
input
stringlengths
2
4.87k
output
stringclasses
807 values
__index_level_0__
int64
1.1k
1.22M
s265574123
p00096
u150984829
1522361727
Python
Python3
py
Accepted
20
5636
143
import sys m=1000;n=m*4 a=[0]*-~n for i in range(2001):a[i]=a[n-i]=(i+3)*(i+2)*(i+1)//6-a[~-i-m]*4*(i>~-m) for e in sys.stdin:print(a[int(e)])
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
12,987
s794049439
p00096
u150984829
1522361844
Python
Python3
py
Accepted
30
5636
135
import sys a=[0]*4001 for i in range(2000):a[i]=a[4000-i]=(i+3)*(i+2)*(i+1)//6-a[i-1001]*4*(i>999) for e in sys.stdin:print(a[int(e)])
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
12,988
s433879670
p00096
u150984829
1522361868
Python
Python3
py
Accepted
30
5636
135
import sys a=[0]*4001 for i in range(1999):a[i]=a[4000-i]=(i+3)*(i+2)*(i+1)//6-a[i-1001]*4*(i>999) for e in sys.stdin:print(a[int(e)])
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
12,989
s207663890
p00096
u150984829
1522361925
Python
Python3
py
Accepted
20
5636
135
import sys a=[0]*4001 for i in range(2001):a[i]=a[4000-i]=(i+3)*(i+2)*(i+1)//6-a[i-1001]*4*(i>999) for e in sys.stdin:print(a[int(e)])
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
12,990
s183344790
p00096
u150984829
1522362052
Python
Python3
py
Accepted
30
5636
133
import sys a=[0]*4001 for i in range(2001):a[i]=a[4000-i]=(i+3)*-~-~i*-~i//6-a[i-1001]*4*(i>999) for e in sys.stdin:print(a[int(e)])
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
12,991
s314688767
p00096
u150984829
1522362055
Python
Python3
py
Accepted
20
5636
133
import sys a=[0]*4001 for i in range(2001):a[i]=a[4000-i]=(i+3)*-~-~i*-~i//6-a[i-1001]*4*(i>999) for e in sys.stdin:print(a[int(e)])
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
12,992
s375119094
p00096
u024715419
1526630737
Python
Python3
py
Accepted
30
5632
297
ans = [0 for i in range(4001)] for i in range(2001): if i > 1000: a = a + 2*(i - 999)*(i - 1000) else: a = 0 ans[i] = (i + 3)*(i + 2)*-~i//6 - a ans[4000 - i] = ans[i] while True: try: n = int(input()) print(ans[n]) except: break
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
12,993
s349604152
p00096
u724548524
1527247507
Python
Python3
py
Accepted
20
5632
177
a = [0] * 4001 for i in range(2001):a[i] = a[4000 - i] = (i + 3) * (i + 2) * (i + 1) // 6 - 4 * a[i - 1001] * (i > 999) while 1: try:print(a[int(input())]) except:break
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
12,994
s287694463
p00096
u847467233
1529229307
Python
Python3
py
Accepted
20
5596
253
# AOJ 0096 Sum of 4 Integers II # Python3 2018.6.15 bal4u MAX = 1000 while True: try: n = int(input()) except: break if n > 2*MAX: n = 4*MAX - n k = n+1 ans = k*(k+1)*(k+2)//6 if n > MAX: k = n-MAX ans -= 2 * k*(k+1)*(k+2)//3; print(ans)
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
12,995
s146798690
p00096
u647766105
1370420047
Python
Python
py
Accepted
100
4336
222
T = 1000 def f(x): return max(0, T + 1 - abs(T - x)) while True: try: n = input() except EOFError: break cnt = 0 for i in range(n+1): cnt += f(i) * f(n-i) print cnt #O(n),
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
12,996
s769623596
p00096
u782850731
1381509605
Python
Python
py
Accepted
20
4336
603
#!/usr/bin/env python from __future__ import division, print_function from sys import stdin, exit def make_combination_list(): cmb = [0] * 4001 count = minus = n = s = 0 for i in range(1001): count += (i+1) * (i+2) // 2 cmb[i] = cmb[4000-i] = count for i in range(1001, 2001): ...
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
12,997
s885810608
p00096
u813384600
1382795442
Python
Python
py
Accepted
40
4308
203
import sys a = range(1,1001) + range(1001,0,-1) for s in sys.stdin: n = int(s) r = 0 for i in range(min(2000,n),-1,-1): if n - i <= 2000: r += a[i] * a[n - i] print r
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
12,998
s325566326
p00096
u260980560
1385212146
Python
Python
py
Accepted
40
4208
225
f = lambda x: x+1 if x<=1000 else 2001-x while 1: try: n = input(); p = min(n, 2000); ans = 0; for i in xrange(n-p,p+1): ans += f(i)*f(n-i); print ans except EOFError: break
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
12,999
s727215931
p00096
u633068244
1394000544
Python
Python
py
Accepted
20
4212
279
def N(n): return (n+1)*(n+2)*(n+3)/6 while True: try: n = int(raw_input()) if n > 2000: n = 4000 - n if n < 1001: print N(n) else: print N(n) - (N(2*(n-1000)) - (n-1000) - 1)/2 except: break
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,000
s630845542
p00096
u633068244
1394000603
Python
Python
py
Accepted
20
4212
279
def N(n): return (n+1)*(n+2)*(n+3)/6 while True: try: n = int(raw_input()) if n > 2000: n = 4000 - n if n < 1001: print N(n) else: print N(n) - (N(2*(n-1000)) - (n-1000) - 1)/2 except: break
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,001
s810065104
p00096
u633068244
1394000629
Python
Python
py
Accepted
20
4212
279
def N(n): return (n+1)*(n+2)*(n+3)/6 while True: try: n = int(raw_input()) if n > 2000: n = 4000 - n if n < 1001: print N(n) else: print N(n) - (N(2*(n-1000)) - (n-1000) - 1)/2 except: break
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,002
s588729439
p00096
u633068244
1394000683
Python
Python
py
Accepted
20
4212
279
def N(n): return (n+1)*(n+2)*(n+3)/6 while True: try: n = int(raw_input()) if n > 2000: n = 4000 - n if n < 1001: print N(n) else: print N(n) - (N(2*(n-1000)) - (n-1000) - 1)/2 except: break
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,003
s026250515
p00096
u633068244
1394000819
Python
Python
py
Accepted
20
4212
279
def N(n): return (n+1)*(n+2)*(n+3)/6 while True: try: n = int(raw_input()) if n > 2000: n = 4000 - n if n < 1001: print N(n) else: print N(n) - (N(2*(n-1000)) - (n-1000) - 1)/2 except: break
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,004
s183970952
p00096
u633068244
1394000860
Python
Python
py
Accepted
20
4212
290
def N(n): return (n+1)*(n+2)*(n+3)/6 while True: try: n = int(raw_input()) if n > 2000: n = 4000 - n if n < 1001: print N(n) else: m = n - 1000 print N(n) - (N(2*m) - m - 1)/2 except: break
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,005
s890920308
p00096
u633068244
1394000946
Python
Python
py
Accepted
20
4208
263
import sys def N(n): return (n+1)*(n+2)*(n+3)/6 for n in sys.stdin: n = int(n) if n > 2000: n = 4000 - n if n < 1001: print N(n) else: m = n - 1000 print N(n) - (N(2*m) - m - 1)/2
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,006
s187128057
p00096
u633068244
1394001015
Python
Python
py
Accepted
20
4208
263
import sys def N(n): return (n+1)*(n+2)*(n+3)/6 for n in sys.stdin: n = int(n) if n > 2000: n = 4000 - n if n < 1001: print N(n) else: m = n - 1000 print N(n) - (N(2*m) - m - 1)/2
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,007
s485110137
p00096
u633068244
1394001131
Python
Python
py
Accepted
20
4208
231
import sys def N(n): return (n+1)*(n+2)*(n+3)/6 for n in sys.stdin: n = int(n) if n > 2000: n = 4000 - n if n < 1001: print N(n) else: m = n - 1000 print N(n) - (N(2*m) - m - 1)/2
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,008
s342763331
p00096
u491763171
1396406922
Python
Python
py
Accepted
90
4460
270
dp = [[0] * 4001 for _ in range(4)] for i in range(1001): dp[0][i] = 1 for i in range(1, 4): for j in range((i + 1) * 1000 + 1): dp[i][j] += sum(dp[i - 1][max(0, j - 1000): j + 1]) while 1: try: print dp[3][input()] except: break
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,009
s826671961
p00096
u747915832
1597381727
Python
Python3
py
Accepted
80
5628
246
s = list(range(1,1001)) + list(range(1001,0,-1)) while True: try: n = int(input()) except: break ans = 0 for i in range(min(n+1,2001)): if 0 <= n-i <= 2000: ans += s[i] * s[n-i] print(ans)
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,010
s713434576
p00096
u187074069
1595929640
Python
Python3
py
Accepted
20
5592
281
while True: try: n = int(input()) if n > 2000: n = 4000 - n ans = (n+1)*(n+2)*(n+3)/6 if n >= 1001: n = n - 1001 ans = ans - 2*(n+1)*(n+2)*(n+3)/3 print(int(ans)) except EOFError: break
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,011
s363675247
p00096
u454636644
1568890009
Python
Python3
py
Accepted
50
5724
326
import sys n_list = [] while True: try: n_list.append(int(input())) except: break for n in n_list: sum_list = list(range(1, 1001)) + list(range(1001, 0, -1)) ans = 0 for i in range(min(n+1, 2001)): if 0<= (n-i) <= 2000: ans += sum_list[i]*sum_list[n-i] print(...
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,012
s162112729
p00096
u990228206
1553234325
Python
Python3
py
Accepted
80
5632
290
dp=[0]*4001 for i in range(4001): if i<1000: dp[i]=i+1 elif i>2000: dp[i]=0 elif i>=1000: dp[i]=2001-i while 1: try: ans=0 n=int(input()) for i in range(n+1): ans+=dp[i]*dp[n-i] print(ans) except:break
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,013
s955788028
p00096
u197615397
1532514705
Python
Python3
py
Accepted
30
5636
188
import sys dp = list(range(1, 1002))+list(range(1000,0,-1)) for n in map(int, sys.stdin): n = min(n, 4000-n) print(sum(dp[i]*dp[j] for i, j in zip(range(n+1), range(n, -1, -1))))
p00096
<H1>4つの整数の和 II</H1> <p> 4,000 以下の正の整数 <var>n</var> を入力し、0 〜 1000 の範囲の整数 <var>a, b, c, d</var> の組で</p> <pre> <var>a + b + c + d = n</var> </pre> <p>を満たすものの組み合わせ数を出力するプログラムを作成して下さい。</p> <H2>Input</H2> <p> 複数のデータセットが与えられます。各データセットに <var>n</var> が1行に与えられます。入力の最後まで処理して下さい。 </p> <p> データセットの数は 50 を超えません。 </p> <H2>Ou...
2 3 35
10 20 8436
13,014
s115146475
p00100
u193025715
1408517027
Python
Python3
py
Accepted
40
6752
468
while True: n = int(input()) if n == 0: break data = {} staff = [] for i in range(n): tmp = list(map(int, input().split(' '))) if tmp[0] in data: data[tmp[0]] += tmp[1] * tmp[2] else: data[tmp[0]] = tmp[1] * tmp[2] staff.append(tmp[0]) ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,015
s264075682
p00100
u899060994
1409139328
Python
Python
py
Accepted
20
4336
461
while True: n = int(raw_input()) if n == 0: break sale = {} order = [] for i in range(n): j,p,q = map(int,raw_input().split()) if j in sale: sale[j] += p * q else: sale[j] = p * q order.append(j) existflag = False...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,016
s953984997
p00100
u814387366
1410679408
Python
Python
py
Accepted
20
4368
620
class sresult(): def judge(self,n): list={} list2=[] for i in range(0,n): str=raw_input() array=str.split(" ") no=int(array[0]) x=no sale=int(array[1]) sold=int(array[2]) if x in list: list[no]+=sale*sold if list[no]>=1000000 and x not in list2: list2.append(no) else ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,017
s646858527
p00100
u696166817
1411658632
Python
Python3
py
Accepted
40
6976
626
# Edit: 2014/09/25 # Lang: Python3 # Time: 0.xxs # from collections import OrderedDict if __name__ == "__main__": while True: d = OrderedDict() n = int(input()) if not n: break # exit at n=0 for i in range(n): s, p, m = map(int, input().strip("\n").split(...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,018
s707030204
p00100
u585391547
1412457145
Python
Python3
py
Accepted
50
6752
352
import collections while 1: li=collections.defaultdict(int) emplist=[] n=int(input()) if n==0: break for i in range(n): (emp,prc,num)=list(map(int,input().split())) if emp not in emplist: emplist.append(emp) li[emp]+=prc*num tmp=True for i in emplist: if li[i]>=1000000: print(i) tmp=False if ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,019
s936769284
p00100
u912237403
1414527618
Python
Python
py
Accepted
10
4356
293
def f(n): D={} A=[] for _ in range(n): a,b,c=map(int,raw_input().split(' ')) if D.has_key(a): D[a]+=b*c else: D[a]=b*c A.append(a) B=[i for i in A if D[i]>=1e6] if B==[]: B=["NA"] return B while 1: n=input() if n==0:break x=f(n) for e in x: print e
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,020
s547752891
p00100
u912237403
1414527745
Python
Python
py
Accepted
20
4352
287
def f(n): D={} A=[] for _ in range(n): a,b,c=map(int,raw_input().split(' ')) if D.has_key(a): D[a]+=b*c else: D[a]=b*c A.append(a) B=[i for i in A if D[i]>=1e6] if B==[]: B=["NA"] return B while 1: n=input() if n==0:break for e in f(n): print e
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,021
s612131615
p00100
u912237403
1414527886
Python
Python
py
Accepted
20
4360
277
def f(n): D={} A=[] for _ in range(n): a,b,c=map(int,raw_input().split(' ')) try: D[a]+=b*c except: D[a]=b*c A.append(a) B=[i for i in A if D[i]>=1e6] if B==[]: B=["NA"] return B while 1: n=input() if n==0:break for e in f(n): print e
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,022
s843786209
p00100
u912237403
1414527956
Python
Python
py
Accepted
20
4360
293
def f(n): D={} A=[] for _ in range(n): a,b,c=map(int,raw_input().split(' ')) if D.has_key(a): D[a]+=b*c else: D[a]=b*c A.append(a) B=[i for i in A if D[i]>=1e6] if B==[]: B=["NA"] return B while 1: n=input() if n==0:break x=f(n) for e in x: print e
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,023
s501733934
p00100
u912237403
1414527989
Python
Python
py
Accepted
20
4356
284
def f(n): D={} A=[] for _ in range(n): a,b,c=map(int,raw_input().split(' ')) try: D[a]+=b*c except: D[a]=b*c A.append(a) B=[i for i in A if D[i]>=1e6] if B==[]: B=["NA"] return B while 1: n=input() if n==0:break x=f(n) for e in x: print e
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,024
s481237273
p00100
u912237403
1414576605
Python
Python
py
Accepted
20
4360
281
def f(n): D={} A=[] for _ in range(n): a,b,c=map(int,raw_input().split(' ')) if a in D: D[a]+=b*c else: D[a]=b*c A.append(a) B=[i for i in A if D[i]>=1e6] if B==[]: B=["NA"] return B while 1: n=input() if n==0:break for e in f(n): print e
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,025
s703159948
p00100
u912237403
1414916262
Python
Python
py
Accepted
20
4356
251
while 1: n=input() if n==0:break D={} A=[] for _ in range(n): a,b,c=map(int,raw_input().split(' ')) if a in D: D[a]+=b*c else: D[a]=b*c A.append(a) f=1 for i in A: if D[i]>=1e6: print i; f=0 if f: print "NA"
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,026
s487107043
p00100
u912237403
1414916646
Python
Python
py
Accepted
20
4360
258
while 1: n=input() if n==0: break D={} A=[] for _ in range(n): a,b,c=map(int, raw_input().split(' ')) if a in D: D[a]+=b*c else: D[a]=b*c A.append(a) B=[i for i in A if D[i]>=1e6] if B==[]: B=["NA"] for e in B: print e
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,027
s620190715
p00100
u912237403
1414916856
Python
Python
py
Accepted
20
4356
280
def f(n): D={} A=[] for _ in range(n): a,b,c=map(int, raw_input().split()) if a in D: D[a]+=b*c else: D[a]=b*c A.append(a) B=[i for i in A if D[i]>=1e6] if B==[]: B=["NA"] return B while 1: n=input() if n==0: break for e in f(n): print e
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,028
s381618004
p00100
u912237403
1414916990
Python
Python
py
Accepted
20
4340
258
while 1: n=input() if n==0: break D={} A=[] for _ in [0]*n: a,b,c=map(int, raw_input().split()) if D.has_key(a): D[a]+=b*c else: D[a]=b*c A.append(a) B=[i for i in A if D[i]>=1e6] if B==[]: B=["NA"] for e in B: print e
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,029
s555453269
p00100
u672822075
1419283308
Python
Python3
py
Accepted
40
6748
273
while True: n=int(input()) if n==0: break l=[] d={} for _ in range(n): a,b,c=list(map(int,input().split())) if a in d: d[a]+=b*c else: d[a]=b*c l.append(a) if max(d.values())<1000000: print("NA") else: for k in l: if d[k]>=1000000: print(k)
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,030
s240082336
p00100
u879226672
1423072774
Python
Python
py
Accepted
20
4336
720
# -*- coding: utf-8 -*- while True: n = int(raw_input()) if n == 0: break else: IDdic={} for k in range(n): ID, p, q = map(int,raw_input().split()) if ID not in IDdic: IDdic[ID] = [k, p*q] elif ID in IDdic: IDdic[I...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,031
s499182252
p00100
u040533857
1425988362
Python
Python3
py
Accepted
40
6748
505
while True: try: n=int(input()) except: break if n==0: break data={} staff=[] for i in range(n): spam=list(map(int,input().split())) if spam[0] in data.keys(): data[spam[0]]+=spam[1]*spam[2] else: data[spam[0]]=spam[1]*spam[...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,032
s433144419
p00100
u580607517
1427629439
Python
Python
py
Accepted
20
4332
356
while True: n = int(raw_input()) if n == 0: break data = {} order = [] for i in range(n): id,price,quant = map(int, raw_input().split()) if id in data: data[id] += price*quant else: data[id] = price*quant order.append(id) if max(data.values()) < 1000000: print "NA" else: for k in order: ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,033
s223091099
p00100
u379499530
1432089085
Python
Python
py
Accepted
20
4336
403
while True: num = int(raw_input()) if num == 0: break dic = {} odr = [] for i in range(num): uid, p, q = map(int, raw_input().split()) if dic.has_key(uid): dic[uid] += p * q else: dic[uid] = p * q odr.append(uid) if max(dic.values()) < 1000000: p...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,034
s147372228
p00100
u308369184
1433405333
Python
Python3
py
Accepted
40
6752
470
while True: n = int(input()) if n == 0: break data = {} staff = [] for i in range(n): tmp = list(map(int, input().split(' '))) if tmp[0] in data: data[tmp[0]] += tmp[1] * tmp[2] else: data[tmp[0]] = tmp[1] * tmp[2] staff.append(tmp[0]) ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,035
s973379781
p00100
u873482706
1435139346
Python
Python
py
Accepted
20
4468
439
while True: N = int(raw_input()) if N == 0: break dic = {} for i in range(N): n, p, q = map(int, raw_input().split()) if not n in dic: dic[n] = [i,p*q] else: dic[n][1] = dic[n][1]+p*q lis = [(v[0], k) for k, v in dic.items() if v[1] >= 100...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,036
s197444869
p00100
u077582668
1445765969
Python
Python
py
Accepted
20
6872
453
import sys import collections thre = 1000000 while 1: n = int(raw_input()) if(n==0):break; dic1 = collections.OrderedDict() exceed = False for i in range(n): (a,b,c) = map(int , raw_input().split()) pre = 0 if(a in dic1): pre =dic1[a] dic1[a] = pre + b * c if...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,037
s030113723
p00100
u489809100
1447597213
Python
Python
py
Accepted
20
6552
344
while True: n = int(raw_input()) if n == 0: break dict = {} date = [] for i in xrange(n): num,a,b = map(long,raw_input().split()) if num in dict: dict[num] += a * b else: dict[num] = a * b date.append(num) judge = True for var in date: if dict[var] >= 1000000: print var judge = False ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,038
s379592397
p00100
u489809100
1447597545
Python
Python
py
Accepted
10
6476
343
while True: n = int(raw_input()) if n == 0: break dict = {} date = [] for i in xrange(n): num,a,b = map(int,raw_input().split()) if num in dict: dict[num] += a * b else: dict[num] = a * b date.append(num) judge = True for var in date: if dict[var] >= 1000000: print var judge = False ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,039
s038353640
p00100
u421942904
1449915018
Python
Python
py
Accepted
20
6872
912
import sys from collections import OrderedDict data = OrderedDict() for line in sys.stdin: lst = line.split(' ') if len( lst ) < 2: cnt = 0 for key, val in data.items(): if va...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,040
s185799162
p00100
u377789069
1450837382
Python
Python
py
Accepted
40
6452
445
while True: n = int(raw_input()) if n == 0: break employee_no = [] info = {} for r in range(n): no,unit_price,quantity = map(int, raw_input().split(' ')) if no in info: info[no] += unit_price*quantity else: info[no] = unit_price*quantity if not no in employee_no: employee_no.append(no) output_...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,041
s822219265
p00100
u775586391
1451493594
Python
Python3
py
Accepted
30
7872
328
while True: n = int(input()) if n == 0: break c = 0 l = [] d = {} for i in range(n): num,x,y = map(int,input().split()) if num in d: d[num] = d[num] + x*y else: d[num] = x*y l.append(num) for i in l: if d[i] >= 1000000: print(i) c += 1 if c == 0: pri...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,042
s839327334
p00100
u873482706
1451557309
Python
Python3
py
Accepted
30
7916
479
while True: N = int(input()) if N == 0: break d = {} for n in range(N): num, p, q = map(int, input().split()) if num in d: d[num][1] += (p*q) else: d[num] = [n, p*q] else: fla = False for k, v in sorted(d.items(), key=lambda x: ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,043
s071182628
p00100
u797673668
1452306604
Python
Python3
py
Accepted
30
7988
429
def parse(i): l = input().strip().split() return ((i, l[0]), int(l[1]) * int(l[2])) n = int(input()) while n: ss, d = [parse(_) for _ in range(n)], {} for s in ss: k = s[0][1] d[k] = (d[k][0], d[k][1] + s[1]) if k in d else s d = [v[0] for v in d.values() if v[1] >= 1000000] ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,044
s021397534
p00100
u463990569
1452924611
Python
Python3
py
Accepted
40
7756
470
while True: n = int(input()) if n == 0: break data = {} staff = [] for i in range(n): tmp = list(map(int, input().split(' '))) if tmp[0] in data: data[tmp[0]] += tmp[1] * tmp[2] else: data[tmp[0]] = tmp[1] * tmp[2] staff.append(tmp[0]) ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,045
s882033793
p00100
u463990569
1452927340
Python
Python3
py
Accepted
40
7808
464
while True: n = int(input()) if n == 0: break data = {} staff = [] for i in range(n): tmp = list(map(int, input().split(' '))) if tmp[0] in data: data[tmp[0]] += tmp[1] * tmp[2] else: data[tmp[0]] = tmp[1] * tmp[2] staff.append(tmp[0]) ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,046
s756536821
p00100
u463990569
1452927404
Python
Python3
py
Accepted
40
7824
468
while True: n = int(input()) if n == 0: break data = {} staff = [] for i in range(n): tmp = [int(el) for el in input().split(' ')] if tmp[0] in data: data[tmp[0]] += tmp[1] * tmp[2] else: data[tmp[0]] = tmp[1] * tmp[2] staff.append(tmp[0...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,047
s733567307
p00100
u463990569
1452927437
Python
Python3
py
Accepted
40
7952
432
while True: n = int(input()) if n == 0: break data = {} staff = [] for i in range(n): x, y, z = [int(el) for el in input().split(' ')] if x in data: data[x] += y * z else: data[x] = y * z staff.append(x) if max(data.values()) < 1e...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,048
s838345323
p00100
u463990569
1452927589
Python
Python3
py
Accepted
50
8496
383
from collections import OrderedDict while True: num = int(input()) if not num: break result = OrderedDict() for _ in range(num): x, y, z = [int(el) for el in input().split(' ')] if x in result: result[x] += y*z else: result[x] = y*z res = [print(k) for...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,049
s111593408
p00100
u463990569
1452927788
Python
Python3
py
Accepted
40
8340
383
from collections import OrderedDict while True: num = int(input()) if not num: break result = OrderedDict() for _ in range(num): x, y, z = [int(el) for el in input().split(' ')] if x in result: result[x] += y*z else: result[x] = y*z res = [print(k) for...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,050
s299838964
p00100
u870028426
1459437407
Python
Python
py
Accepted
20
6364
594
n = int(raw_input()) while n != 0: pass_flag = 0 sales_dict = {} id_list = [] for x in range(0, n): data = raw_input() data_list = map(int, data.split(' ')) if not data_list[0] in sales_dict: sales_dict[data_list[0]] = data_list[1] * data_list[2] id_list.a...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,051
s608611553
p00100
u203261375
1466604835
Python
Python3
py
Accepted
40
7844
426
while True: n = int(input()) if n == 0: break flag = False dic = {} for j in range(n): i,p,q = map(int, input().split()) if i not in dic: dic[i] = [p*q, 0] else: dic[i][0] += p*q if dic[i][0] >= 10**6 and dic[i][1] == 0: ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,052
s701139044
p00100
u755162050
1468220870
Python
Python3
py
Accepted
50
7552
880
from sys import stdin if __name__ == '__main__': for line in stdin: if int(line) == 0: break isEmpty = True record = {} for _ in range(int(line)): employee = input().split(' ') total = int(employee[1]) * int(employee[2]) if total >= ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,053
s519610732
p00100
u797495064
1468700131
Python
Python3
py
Accepted
40
8324
473
from collections import OrderedDict while True: n = int(input()) if n == 0: break dic = OrderedDict() for i in range(n): line = input().split() key = line[0] sales = int(line[1]) * int(line[2]) if key in dic: dic[key] += sales else: ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,054
s663972982
p00100
u589886885
1472129017
Python
Python3
py
Accepted
40
8536
436
from collections import OrderedDict while True: n = int(input()) if n == 0: break ans = OrderedDict() for i in range(n): e, p, q = [int(x) for x in input().split()] if e in ans: ans[e] += p * q else: ans[e] = p * q flag = True for k, v in ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,055
s912361118
p00100
u372789658
1475915257
Python
Python3
py
Accepted
40
7788
557
while True: num=int(input()) if num==0: break else: li=[] d={} for i in range (num): info=list(map(int,input().split())) try: d[info[0]]+=info[1]*info[2] except: d[info[0]]=info[1]*info[2] li....
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,056
s504046742
p00100
u500396695
1477910184
Python
Python3
py
Accepted
30
7792
328
while True: n = int(input()) if n == 0: break c = 0 l = [] d = {} for i in range(n): num,x,y = map(int,input().split()) if num in d: d[num] = d[num] + x*y else: d[num] = x*y l.append(num) for i in l: if d[i] >= 1000000: print(i) c += 1 if c == 0: pri...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,057
s738945764
p00100
u500396695
1477911053
Python
Python3
py
Accepted
30
7760
443
while True: n = int(input()) if n == 0: break workers = {} workernames = [] greatworkers = 0 for i in range(n): person, price, number = map(int, input().split()) if person in workers: workers[person] += price * number else: workers[person] = price * number workernames.append(person) for worker i...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,058
s466355136
p00100
u393305246
1480317494
Python
Python
py
Accepted
20
6372
356
while True: time=input() if time==0: break worr={} mem=[] for i in range(time): shain=map(int, raw_input().split()) if shain[0] not in worr: worr[shain[0]]=shain[1]*shain[2] mem.append(shain[0]) else: worr[shain[0]]+=shain[1]*shain[2] check=1 for i in mem: if worr[i]>=1000000: print i ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,059
s363616343
p00100
u301729341
1481385844
Python
Python3
py
Accepted
50
7684
463
while True: num = 0 n = int(input()) E_lis = [] pri_lis = [] if n == 0: break for i in range(n): e,p,q = map(int,input().split()) if e in E_lis: pri_lis[E_lis.index(e)] += p*q else: E_lis.append(e) pri_lis.append(p * q) for ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,060
s045719338
p00100
u123687446
1482154533
Python
Python3
py
Accepted
40
8232
521
n = int(input()) while n != 0: score = {} j = 0 for i in range(n): e,p,q = list(map(int,input().split())) if e in score: score[e]["value"] += p*q else: score[e] = {"value":p*q, "index":j} j += 1 f = {} for e,v in score.items(): if v...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,061
s043767065
p00100
u711765449
1485443363
Python
Python3
py
Accepted
30
7760
446
while True: n = int(input()) if n == 0: break d = {} e = [] for i in range(n): tmp = list(map(int, input().split(' '))) if tmp[0] in d: d[tmp[0]] += tmp[1] * tmp[2] else: d[tmp[0]] = tmp[1] * tmp[2] e.append(tmp[0]) if max(d.v...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,062
s407347862
p00100
u078042885
1485448265
Python
Python3
py
Accepted
40
7844
301
while 1: n=int(input()) if n==0:break a={};c=[] for _ in range(n): b=list(map(int,input().split())) if b[0] in a:a[b[0]]+=b[1]*b[2] else:a[b[0]]=b[1]*b[2];c.append(b[0]) if max(a.values())<=999999:print('NA' ) for i in c: if a[i]>999999:print(i)
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,063
s378250559
p00100
u661290476
1487311996
Python
Python3
py
Accepted
30
7812
331
while True: n = int(input()) if n == 0: break emp = [0] * 4001 used = set() for i in range(n): e, p, q = map(int, input().split()) emp[e] += p * q if 1000000 <= emp[e] and e not in used: print(e) used.add(e) if len(used) == 0: print...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,064
s550759444
p00100
u179694829
1488193354
Python
Python3
py
Accepted
60
7884
358
l = int(input()) while l != 0: k = 0 A = [] B = [] for l in range(0,l): li = input().split() if li[0] in A: i = A.index(li[0]) B[i] = B[i] + (int(li[1]) * int(li[2])) else: A.append(li[0]) B.append(int(li[1]) * int(li[2])) for j,b in enumerate(B): if b >= 10**6: print(A[j]) k = 1 if k...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,065
s520730711
p00100
u546285759
1489292097
Python
Python3
py
Accepted
60
7764
360
while True: n = int(input()) if n == 0: break d = dict() order = [] for _ in range(n): i, p, q = map(int, input().split()) d[i] = d[i]+p*q if i in d else p*q if i not in order: order.append(i) b = True for o in order: if d[o] > 999999: print(o) ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,066
s529099194
p00100
u179694829
1490063828
Python
Python3
py
Accepted
50
7828
320
while True: N= int(input()) if N == 0: break D = {} di = [] for n in range(N): e,p,q = input().split() p = int(p) q = int(q) if e not in di: di.append(e) D[e] = p * q else: D[e] = D[e] + p * q flag = 0 for dj in di: if D[dj] >= 10**6: print(dj) flag = 1 if flag == 0: print("NA")
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,067
s001073571
p00100
u462831976
1494158772
Python
Python3
py
Accepted
60
8104
538
# -*- coding: utf-8 -*- import sys import os import math from collections import defaultdict for s in sys.stdin: n = int(s) if n == 0: break d = defaultdict(int) keys = [] for i in range(n): e, p, q = map(int, input().split()) d[e] += p * q if e not in keys: ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,068
s768725036
p00100
u589276934
1495700208
Python
Python3
py
Accepted
80
7900
1,007
# coding: utf-8 # Here your code ! employeeSalesList = [] def resetDataset(): for count in range(len(employeeSalesList)): employeeSalesList.pop(0) def readDataCount(): return int(input()) def searchEmployeeSales(employeeId): for data in employeeSalesList: if data[0] == employeeId: ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,069
s933057523
p00100
u589276934
1495700442
Python
Python3
py
Accepted
80
7928
984
# coding: utf-8 # Here your code ! employeeSalesList = [] def resetDataset(): del employeeSalesList[0 : len(employeeSalesList) + 1] def readDataCount(): return int(input()) def searchEmployeeSales(employeeId): for data in employeeSalesList: if data[0] == employeeId: return data ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,070
s249037711
p00100
u589276934
1495700646
Python
Python3
py
Accepted
90
7876
1,063
# coding: utf-8 # Here your code ! employeeSalesList = [] def resetDataset(): del employeeSalesList[0 : len(employeeSalesList) + 1] def readDataCount(): return int(input()) def searchEmployeeSales(employeeId): for data in employeeSalesList: if data[0] == employeeId: return data ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,071
s100440095
p00100
u589276934
1495700714
Python
Python3
py
Accepted
90
7968
1,035
# coding: utf-8 # Here your code ! employeeSalesList = [] def resetDataset(): del employeeSalesList[0 : len(employeeSalesList) + 1] def readDataCount(): return int(input()) def searchEmployeeSales(employeeId): for data in employeeSalesList: if data[0] == employeeId: return data ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,072
s693858034
p00100
u589276934
1495701398
Python
Python3
py
Accepted
80
7840
967
# coding: utf-8 # Here your code ! employeeSalesList = [] def resetDataset(): del employeeSalesList[0 : len(employeeSalesList) + 1] def readDataCount(): return int(input()) def searchEmployeeSales(employeeId): for data in employeeSalesList: if data[0] == employeeId: return data ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,073
s225394692
p00100
u589276934
1495701568
Python
Python3
py
Accepted
90
7792
796
# coding: utf-8 # Here your code ! def searchEmployeeSales(employeeId): for data in employeeSalesList: if data[0] == employeeId: return data newData = [employeeId, 0] employeeSalesList.append(newData) return newData def printEmployeeOfDataset(): answerList = [data[0] for da...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,074
s022812915
p00100
u589276934
1495701991
Python
Python3
py
Accepted
90
7752
772
# coding: utf-8 # Here your code ! def searchEmployeeSales(employeeId): for data in employeeSalesList: if data[0] == employeeId: return data newData = [employeeId, 0] employeeSalesList.append(newData) return newData dataCount = int(input()) while dataCount > 0: employeeSale...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,075
s422892537
p00100
u151989268
1495951688
Python
Python3
py
Accepted
50
8528
384
from collections import OrderedDict while True: n = int(input()) if not n: break ds = OrderedDict() for _ in range(n): i, p, q = input().split() ds[i] = ds.get(i, 0) + int(p) * int(q) ds = OrderedDict((i, v) for i, v in ds.items() if v >= 1000000) if ds: ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,076
s942139022
p00100
u922489088
1496241489
Python
Python3
py
Accepted
50
7752
492
import sys while True: n = int(sys.stdin.readline().rstrip()) if n == 0: break members = [] sales = {} for i in range(n): e,p,q = sys.stdin.readline().rstrip().split(' ') if not e in members: members.append(e) sales[e] = 0 sales[e] += int(p) ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,077
s018964962
p00100
u724963150
1496503122
Python
Python3
py
Accepted
40
7756
418
while True: n=int(input()) if n==0:break res={} li=[] for i in range(n): d=[int(num) for num in input().split(' ')] if d[0]-1 in res: res[d[0]-1]+=d[1]*d[2] else: res[d[0]-1]=d[1]*d[2] li.append(d[0]-1) flag=False for i in li: ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,078
s966329428
p00100
u868716420
1497150343
Python
Python3
py
Accepted
50
8420
411
from collections import OrderedDict while True : n = int(input()) if n == 0 : break box = OrderedDict() for _ in ([None]*n) : e, p, q = map(int, input().split()) if e in box : box[e] += p * q else : box[e] = p * q check = 0 for _ in box : if box...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,079
s636108110
p00100
u904173900
1499774142
Python
Python3
py
Accepted
30
7748
328
while True: n = int(input()) if n == 0: break c = 0 l = [] d = {} for i in range(n): num,x,y = map(int,input().split()) if num in d: d[num] = d[num] + x*y else: d[num] = x*y l.append(num) for i in l: if d[i] >= 1000000: print(i) c += 1 if c == 0: pri...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,080
s205314062
p00100
u546285759
1501493949
Python
Python3
py
Accepted
30
7916
482
while True: n = int(input()) if n == 0: break d = dict() sep = [] for _ in range(n): i, p, q = map(int, input().split()) if i in d: d[i] += p*q else: d[i] = p*q sep.append(i) tmp = list(filter(lambda x: x[1] >= 1000000, d.items(...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,081
s793520865
p00100
u922489088
1503918011
Python
Python
py
Accepted
20
6448
493
import sys while True: n = int(sys.stdin.readline().rstrip()) if n == 0: break members = [] sales = {} for i in range(n): e,p,q = sys.stdin.readline().rstrip().split(' ') if not e in members: members.append(e) sales[e] = 0 sales[e] += int(p)...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,082
s946015000
p00100
u811733736
1504177600
Python
Python3
py
Accepted
50
7968
1,077
# -*- coding: utf-8 -*- """ http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0100&lang=jp """ import sys def solve(data): result = [] total_sales = [0 for _ in range(4000+1)] for id, unit_price, quantity in data: total_sales[id] += unit_price * quantity if total_sales[id] >= 100000...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,083
s857513059
p00100
u811733736
1504178106
Python
Python3
py
Accepted
40
8420
1,132
# -*- coding: utf-8 -*- """ http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0100&lang=jp """ import sys from collections import OrderedDict def solve(data): # ?£???????1,000,000??\????????????ID????????? # ??????????????????????????°????????´??????????????????ID?????\?????????????????????????????????...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,084
s852565211
p00100
u453481381
1504585948
Python
Python3
py
Accepted
30
7832
328
while True: n = int(input()) if n == 0: break c = 0 l = [] d = {} for i in range(n): num,x,y = map(int,input().split()) if num in d: d[num] = d[num] + x*y else: d[num] = x*y l.append(num) for i in l: if d[i] >= 1000000: print(i) c += 1 if c == 0: pri...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,085
s554686211
p00100
u957021183
1505292831
Python
Python3
py
Accepted
50
8028
602
# Aizu Problem 0100: Sale Result # import sys, math, os # read input: PYDEV = os.environ.get('PYDEV') if PYDEV=="True": sys.stdin = open("sample-input.txt", "rt") while True: N = int(input()) if N == 0: break sales = {} good = False order = [] for n in range(N): i, p, q = ...
p00100
<H1>Sale Result</H1> <p> There is data on sales of your company. Your task is to write a program which identifies good workers. </p> <p> The program should read a list of data where each item includes the employee ID <i>i</i>, the amount of sales <i>q</i> and the corresponding unit price <i>p</i>. Then, the program ...
4 1001 2000 520 1002 1800 450 1003 1600 625 1001 200 1220 2 1001 100 3 1005 1000 100 2 2013 5000 100 2013 5000 100 0
1001 1003 NA 2013
13,086