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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s037291604 | p00027 | u575065019 | 1362262160 | Python | Python | py | Accepted | 20 | 4232 | 442 | ans=[]
week=[
'Monday', #0
'Tuesday', #1
'Wednesday', #2
'Thursday', #3
'Friday', #4
'Saturday', #5
'Sunday' #6
]
year=[
2, 5, 6, 2, 4, 0, 2, 5, 1, 3, 6, 1
]
while True:
month,day=map(int,raw_input().split()... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,102 |
s761217569 | p00027 | u782850731 | 1362267541 | Python | Python | py | Accepted | 10 | 4516 | 291 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from sys import stdin
from datetime import date
for line in stdin:
if line.startswith('0 0'):
break
print(date(2004, *(int(s) for s in line.split())).strftime('%A')) | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,103 |
s545142279 | p00027 | u282635979 | 1363620853 | Python | Python | py | Accepted | 10 | 4436 | 439 | import datetime
while True:
x = map(int,raw_input().split(' '))
if x[0] != 0:
day = datetime.date(2004,x[0],x[1])
weekday = day.isoweekday()
if weekday == 1:
print 'Monday'
if weekday == 2:
print 'Tuesday'
if weekday == 3:
print 'Wednesday'
if weekday == 4:
print 'Thursday'
if weekday == 5:
... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,104 |
s527359534 | p00027 | u310759044 | 1363864948 | Python | Python | py | Accepted | 20 | 4420 | 228 | import datetime
week=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
while 1:
month,day=map(int,raw_input().split())
if month==0:break;
print week[datetime.datetime(2004,month,day).weekday()] | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,105 |
s388074654 | p00027 | u147801965 | 1365518092 | Python | Python | py | Accepted | 20 | 4224 | 223 | a=['Wednesday','Thursday','Friday','Saturday','Sunday','Monday','Tuesday',0]
while True:
q=map(int,raw_input().split())
if sum(q) == 0: break
print a[(sum([0,31,29,31,30,31,30,31,31,30,31,30,31][:q[0]])+q[1])%7] | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,106 |
s387896963 | p00027 | u147801965 | 1365523924 | Python | Python | py | Accepted | 10 | 4228 | 219 | while True:
q=map(int,raw_input().split())
if sum(q) == 0: break
print ['Wednesday','Thursday','Friday','Saturday','Sunday','Monday','Tuesday',0][(sum([0,31,29,31,30,31,30,31,31,30,31,30,31][:q[0]])+q[1])%7] | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,107 |
s036627203 | p00027 | u542421762 | 1368264497 | Python | Python | py | Accepted | 10 | 4496 | 248 |
import sys
from datetime import datetime
y = 2004
#input_file = open(sys.argv[1], 'r')
for line in sys.stdin:
(m, d) = tuple(map(int, line.split(' ')))
if m == 0:
break
date = datetime(y, m, d)
print date.strftime("%A") | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,108 |
s504491910 | p00027 | u350508326 | 1372543882 | Python | Python | py | Accepted | 20 | 4244 | 762 | nm = [0,31,29,31,30,31,30,31,31,30,31,30]
while True:
m,d = map(int,raw_input().split(" "))
if m == 0:
break
else:
nd = 0
for i in range(m):
nd += nm[i]
nd += d
n = nd%7
if n == 1:
print "Thursday"
elif n == 2:
pri... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,109 |
s407260349 | p00027 | u912237403 | 1378035759 | Python | Python | py | Accepted | 10 | 4240 | 438 | weekday=["Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday", "Sunday"]
def monthday(month):
if month in [1,3,5,7,8,10,12]: return 31
elif month in [4,6,9,11]: return 30
else: return 29
def days(month, day):
return sum([monthday(i) for i in range(1, month)]) + day
while Tr... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,110 |
s180112839 | p00027 | u813384600 | 1380543518 | Python | Python | py | Accepted | 10 | 4408 | 230 | import datetime
w = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
while True:
m,d = map(int, raw_input().split())
if m == 0:
break
print w[datetime.date(2004, m, d).weekday()] | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,111 |
s298074221 | p00027 | u523886269 | 1381554390 | Python | Python | py | Accepted | 20 | 5096 | 368 | import datetime
import sys
weekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
for line in sys.stdin:
data = line.strip().split()
m = data[0]
d = data[1]
if m == '0':
break
date = datetime.datetime.strptime('2004-' + m + '-' + d + ' 13:13:13', '%Y-%m-... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,112 |
s738993556 | p00027 | u633068244 | 1393393038 | Python | Python | py | Accepted | 20 | 4228 | 330 | y = [31,29,31,30,31,30,31,31,30,31,30,31]
dow = {0:"Monday", 1:"Tuesday", 2:"Wednesday", 3:"Thursday", 4:"Friday", 5:"Saturday", 6:"Sunday"}
while True:
m, d = map(int, raw_input().split())
if m == 0 and d == 0:
break
n = 0
for i in range(m):
n += y[i]
n -= (y[m-1]-d+1)
print do... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,113 |
s223778887 | p00027 | u912237403 | 1394315226 | Python | Python | py | Accepted | 10 | 4216 | 249 | wd=["Mon","Tues","Wednes","Thurs","Fri","Satur","Sun"]
md=[0,31,29,31,30,31,30,31,31,30,31,30,31]
while 1:
m,d = map(int, raw_input().split())
if m==0: break
s = sum([md[i] for i in range(m)]) + d + 2
s = wd[s % 7]+"day"
print s | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,114 |
s310776938 | p00027 | u491763171 | 1396402549 | Python | Python | py | Accepted | 10 | 4396 | 243 | import datetime
WEEKDAY = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
while 1:
a, b = map(int, raw_input().split())
if a == b == 0:
break
print WEEKDAY[datetime.date(2004, a, b).weekday()] | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,115 |
s175896051 | p00027 | u246033265 | 1396620475 | Python | Python | py | Accepted | 20 | 4400 | 234 | import datetime
while True:
m, d = map(int, raw_input().split())
if m == 0 and d == 0:
break
print ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][datetime.date(2004, m, d).weekday()] | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,116 |
s785191894 | p00027 | u378480414 | 1397103998 | Python | Python | py | Accepted | 10 | 4220 | 279 | days=(31,29,31,30,31,30,31,31,30,31,30,31)
day=('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday')
while True:
total=0
m,d=map(int,raw_input().split(" "))
if m!=0:
for i in range(m-1):
total+=days[i]
total+=d
print day[(total+3)%7]
else:
break | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,117 |
s730557172 | p00027 | u436634575 | 1401169631 | Python | Python3 | py | Accepted | 30 | 6724 | 298 | dw = ('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday')
dm = (31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
while True:
m, d = map(int, input().split())
if m == d == 0: break
total = sum(dm[i] for i in range(m - 1)) + d - 1
print(dw[(total + 4) % 7]) | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,118 |
s337660764 | p00027 | u747915832 | 1597135184 | Python | Python3 | py | Accepted | 20 | 5600 | 309 | day = [0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30]
for i in range(2,12):
day[i] += day[i-1]
week = ['Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday', 'Monday', 'Tuesday']
while True:
M, D = map(int, input().split())
if M==0:
break
days = day[M-1] + D
print(week[days%7])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,119 |
s403192069 | p00027 | u187074069 | 1595260448 | Python | Python3 | py | Accepted | 20 | 5596 | 554 | lst = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
while True:
m, d = map(int, input().split())
if m == 0:
break
if m == 1 or m == 4 or m == 7:
print(lst[(d + 2) % 7])
elif m == 2 or m == 8:
print(lst[(d + 5) % 7])
elif m == 3 or m == ... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,120 |
s168698356 | p00027 | u814278309 | 1592126268 | Python | Python3 | py | Accepted | 20 | 5604 | 238 | while 1:
m,d = map(int,input().split())
if m == 0:
break
w = ["Wednesday","Thursday","Friday","Saturday","Sunday","Monday","Tuesday"]
day = [0,31,60,91,121,152,182,213,244,274,305,335]
print(w[(day[m-1]+d)%7])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,121 |
s379003483 | p00027 | u842461513 | 1591399668 | Python | Python3 | py | Accepted | 20 | 6048 | 368 | #datetimeモジュールをインポートする
import datetime
#aとbが0になるまで処理を繰り返す
while True:
a,b = map(int,input().split())
if a == 0 and b == 0:break
#detetimeモジュールを使い、youbiに代入し、"strftime"を使い、曜日を取得する
youbi = datetime.datetime(2004,a,b)
print(youbi.strftime("%A"))
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,122 |
s494225542 | p00027 | u286298310 | 1590420932 | Python | Python3 | py | Accepted | 40 | 7180 | 253 | from datetime import date
import calendar
while True:
m,d = map(int,(input().split()))
if m == 0 and d == 0:
break
x = date(2004,m,d).weekday()
print(["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"][x])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,123 |
s667676530 | p00027 | u260980560 | 1589610001 | Python | Python3 | py | Accepted | 30 | 5624 | 555 | import sys
readline = sys.stdin.readline
write = sys.stdout.write
def convert(y, m, d):
if m <= 2:
m += 12
y -= 1
mjd = int(365.25*y) + (y//400) - (y//100) + int(30.59*(m-2)) + d - 678912
return mjd
youbi = [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,124 |
s599850053 | p00027 | u240091169 | 1588733164 | Python | Python3 | py | Accepted | 20 | 5612 | 1,242 | while True :
M, D = map(int, input().split())
if M == 0 and D == 0 :
break
else :
if M == 1 :
days = D
elif M == 2 :
days = 31 + D
elif M == 3 :
days = 31+29+D
elif M == 4 :
days = 31+29+31+D
elif M == 5 :
... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,125 |
s451669581 | p00027 | u808372529 | 1584065184 | Python | Python3 | py | Accepted | 20 | 6036 | 257 | from datetime import date
dic = {0:"Monday", 1:"Tuesday", 2:"Wednesday", 3:"Thursday", 4:"Friday", 5:"Saturday", 6:"Sunday"}
while True:
month, day = map(int, input().split())
if not month:
break
print(dic[date(2004, month, day).weekday()])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,126 |
s020202292 | p00027 | u630911389 | 1583407146 | Python | Python3 | py | Accepted | 20 | 6032 | 238 | from datetime import date
days = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
while True:
month,day = map(int, input().split())
if month == 0:
break
print(days[date(2004, month, day).weekday()])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,127 |
s926895937 | p00027 | u642972715 | 1582600479 | Python | Python3 | py | Accepted | 50 | 7336 | 438 | import datetime
yobi = {0:"Monday",1:"Tuesday",2:"Wednesday",3:"Thursday",4:"Friday",5:"Saturday",6:"Sunday"}
try:
while True:
m, d= map(int, input().split())
if m == 0 and d == 0 :
exit()
day = datetime.datetime.strptime("2004/" + str(m) + "/" + str(d),"%Y/%m/%d")
if day... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,128 |
s688038737 | p00027 | u153447291 | 1576492852 | Python | Python3 | py | Accepted | 20 | 5592 | 263 | month = [0,31,60,91,121,152,182,213,244,274,305,335]
day = ["Wednesday","Thursday","Friday","Saturday","Sunday","Monday","Tuesday"]
while True:
a,b = map(int,input().split())
if a == 0:
break
num = month[a-1]+b
print(day[num%7])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,129 |
s536492251 | p00027 | u314166831 | 1575555898 | Python | Python3 | py | Accepted | 20 | 5688 | 3,361 | # coding=utf-8
###
### for python program
###
import sys
import math
# math class
class mymath:
### pi
pi = 3.14159265358979323846264338
### Prime Number
def pnum_eratosthenes(self, n):
ptable = [0 for i in range(n+1)]
plist = []
for i in range(2, n+1):
if ptable... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,130 |
s120495179 | p00027 | u829695570 | 1575301344 | Python | Python3 | py | Accepted | 30 | 6048 | 162 | import datetime
while 1:
m, d = map(int, input().split())
if m == 0:
break
dt = datetime.datetime(2004, m, d)
print(dt.strftime('%A'))
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,131 |
s332454593 | p00027 | u803862921 | 1570863243 | Python | Python3 | py | Accepted | 30 | 6040 | 282 |
import datetime
L = [ "Monday", "Tuesday", "Wednesday", "Thursday","Friday",
"Saturday", "Sunday" ]
while True:
m, d = [int(x) for x in input().split()]
if m == 0 and d == 0:
break
dt = datetime.datetime(2004, m, d)
w = dt.weekday()
print(L[w])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,132 |
s929259183 | p00027 | u472768263 | 1570703610 | Python | Python3 | py | Accepted | 20 | 5596 | 637 | while True:
month,day=list(map(int, input().split()))
if month==day==0:
break
month_day=[30,29,31,30,31,30,31,31,30,31,30,31] #1から12
tmp_day=0
for i in range(month-1):
tmp_day+=month_day[i]
tmp_day+=day
amari=tmp_day%7
if month==day==1:
print("Thursday... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,133 |
s675024853 | p00027 | u629170852 | 1568822850 | Python | Python3 | py | Accepted | 30 | 5596 | 339 | import sys
def zeller(y,m,d):
if m==1 or m==2:
y-=1
m+=12
day=(y+int(y/4)-int(y/100)+int(y/400)+int((13*m+8)/5)+d)%7
D={0:'Sunday',1:'Monday',2:'Tuesday',3:'Wednesday',4:'Thursday',5:'Friday',6:'Saturday'}
return D[day]
for l in sys.stdin:
m,d=list(map(int,l.split()))
if m==0:
break
print... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,134 |
s158678501 | p00027 | u824708460 | 1566299011 | Python | Python3 | py | Accepted | 30 | 5592 | 297 | w = ["Wednesday", "Thursday", "Friday",
"Saturday", "Sunday", "Monday", "Tuesday"]
a = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
while 1:
m, d = map(int, input().split())
if m == 0:
break
s = 0
for i in range(m - 1):
s += a[i]
print(w[(s+d) % 7])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,135 |
s426669821 | p00027 | u427219397 | 1564897664 | Python | Python3 | py | Accepted | 30 | 6036 | 236 | import datetime
week=["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
while True:
a,b=map(int, input().split())
if a == b == 0:
break
print(week[datetime.date(2004, a, b).weekday()])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,136 |
s395213359 | p00027 | u804558166 | 1564325361 | Python | Python3 | py | Accepted | 20 | 5596 | 297 | W = ('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday')
M = (31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
while True:
m, d = map(int, input().split())
if m == d == 0: break
total = sum(M[i] for i in range(m - 1)) + d - 1
print(W[(total + 4) % 7])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,137 |
s622149155 | p00027 | u013648252 | 1563753447 | Python | Python3 | py | Accepted | 20 | 5600 | 367 | import sys
day = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
num = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
for s in sys.stdin:
M, D = map(int, s.strip().split())
if M == 0:
break
totalDay = D
M -= 1
while M > 0:
totalDay += num[M-1]
... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,138 |
s421201803 | p00027 | u371539389 | 1560782835 | Python | Python3 | py | Accepted | 20 | 6036 | 278 | import datetime
num2wd={0:"Monday",1:"Tuesday",2:"Wednesday",3:"Thursday",4:"Friday",5:"Saturday",6:"Sunday"}
while True:
m,d=[int(i) for i in input().split(" ")]
if m==0 and d==0:
break
date=datetime.datetime(2004,m,d)
print(num2wd[date.weekday()])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,139 |
s449119927 | p00027 | u548252256 | 1560256933 | Python | Python3 | py | Accepted | 20 | 5596 | 326 | if __name__ == '__main__':
W = ["Thursday","Friday","Saturday","Sunday","Monday","Tuesday","Wednesday"]
Y = [31,29,31,30,31,30,31,31,30,31,30,31]
while True:
m,d = map(int,input().split())
if m == 0 and d == 0:
break
day = 0
for i in range(m-1):
day += Y[i]
day += d
ans = day % 7
print(W[ans-... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,140 |
s750884127 | p00027 | u506537276 | 1560151258 | Python | Python3 | py | Accepted | 20 | 5596 | 296 | m = [0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
d = ["Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday"]
while True:
a, b = map(int, input().split())
if a + b == 0:
break
mon = 0
for i in range(a):
mon += m[i]
day = mon + b
print(d[day % 7])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,141 |
s503069532 | p00027 | u625806423 | 1557142773 | Python | Python3 | py | Accepted | 20 | 5592 | 456 | month = [3, 1, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3]
while True:
m, d = map(int, input().split())
if m == 0:
break
piv = 3
for i in range(m-1):
piv += month[i]
piv += d
piv %= 7
if piv == 0:
print("Sunday")
elif piv == 1:
print("Monday")
elif piv == 2:
print("Tuesday")
elif piv == 3:
... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,142 |
s605877756 | p00027 | u406093358 | 1555548038 | Python | Python | py | Accepted | 10 | 4640 | 266 | days = ['Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday', 'Monday', 'Tuesday']
month = [0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30]
while True:
m, d = map(int, raw_input().split())
if m == 0: break
for i in range(0, m):
d += month[i]
print days[d%7]
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,143 |
s369803871 | p00027 | u990228206 | 1553152646 | Python | Python3 | py | Accepted | 30 | 6052 | 147 | import datetime
while 1:
m,d=map(int,input().split())
if m==d==0:break
ans=datetime.datetime(2004, m, d)
print(ans.strftime('%A'))
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,144 |
s782579081 | p00027 | u563075864 | 1542968129 | Python | Python3 | py | Accepted | 20 | 5600 | 294 | ndays = [31,29,31,30,31,30,31,31,30,31,30,31]
days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
offset = 3
while(1):
m,d = [int(i) for i in input().split()]
if m == 0 and d == 0:
break
tot_d = sum(ndays[:m-1]) + d
print(days[(tot_d + offset - 1)%7])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,145 |
s638302539 | p00027 | u067299340 | 1542257800 | Python | Python3 | py | Accepted | 30 | 6040 | 252 | from datetime import *
wd_map = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
while True:
month, day = map(int, input().split())
if month == 0:
break
print(wd_map[date(2004, month, day).weekday()])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,146 |
s748382095 | p00027 | u717526540 | 1541665712 | Python | Python3 | py | Accepted | 20 | 5592 | 344 | daylist = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
week = ["Wednesday", "Thursday", "Friday", "Saturday",
"Sunday", "Monday", "Tuesday"]
while(1):
m, d = map(int, input().split())
if m == 0:
break
day = 0
for i in range(m-1):
day += daylist[i]
day += d
w = week... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,147 |
s549332604 | p00027 | u820831349 | 1539441364 | Python | Python3 | py | Accepted | 20 | 5596 | 377 | lastDayofLastMonth = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]
dateList = ["Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday"]
inputData = []
while True:
inputData = list(map(int, input().split()))
if inputData[0]==0:
break
dd_date = lastDayofLastMonth[inputD... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,148 |
s377663846 | p00027 | u219940997 | 1537458375 | Python | Python3 | py | Accepted | 40 | 7204 | 301 | import datetime
import calendar
def trans(month, day, year=2004):
past = datetime.date(year, month, day)
result = calendar.day_name[past.weekday()]
return result
while True:
month, day = map(int, input().split())
if month == day == 0: break
print(trans(month, day))
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,149 |
s580817880 | p00027 | u252700163 | 1537205901 | Python | Python3 | py | Accepted | 50 | 7348 | 337 | import datetime
import sys
i_weekday = { i:weekday for i, weekday in enumerate('Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split() ) }
while True:
M, D = map(int, input().split())
if M == 0:
sys.exit()
dt = datetime.datetime.strptime(f'2004-{M}-{D}', '%Y-%m-%d')
#print(dt)
print(i_weekday[ ... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,150 |
s826354420 | p00027 | u319725914 | 1534257080 | Python | Python3 | py | Accepted | 20 | 5604 | 257 | while(True):
m,d = map(int,input().split())
if m==0 and d==0:
break
dn = sum([[31,29,31,30,31,30,31,31,30,31,30,31][a] for a in range(m-1)]) + d-1
print(["Thursday","Friday","Saturday","Sunday","Monday","Tuesday","Wednesday"][dn%7])
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,151 |
s861459003 | p00027 | u539753516 | 1533384458 | Python | Python3 | py | Accepted | 20 | 6056 | 144 | import datetime
while 1:
try:
m,d=map(int, input().split())
print(datetime.date(2004, m,d).strftime('%A'))
except:break
| p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,152 |
s056862794 | p00027 | u079141094 | 1517117947 | Python | Python3 | py | Accepted | 30 | 5604 | 634 | def solve():
day = [
'Wednesday',
'Thursday',
'Friday',
'Saturday',
'Sunday',
'Monday',
'Tuesday',
]
days_month = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
days_total = []
for i in range(len(days_month)):
days_total.append(s... | p00027 |
<H1>What day is today?</H1>
<p>
Your task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the date. Jan. 1, 2004, is Thursday. Note that 2004 is a leap year and we have Feb. 29.
</p>
<H2>Input</H2>
<p>
The input is a sequence of datasets. The end of the input is indicat... | 1 1
2 29
0 0
| Thursday
Sunday
| 8,153 |
s561616795 | p00028 | u647694976 | 1556079165 | Python | Python3 | py | Accepted | 20 | 5596 | 214 | lis=[0 for i in range(100)]
while True:
try:
N=int(input())
lis[N-1] +=1
except:
for j in range(100):
if lis[j]==max(lis):
print(j+1)
break
| p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,154 |
s200129812 | p00028 | u560838141 | 1408859634 | Python | Python | py | Accepted | 10 | 4204 | 187 |
hist = [0 for i in range(100)]
l = []
while True:
try:
hist[input() - 1] += 1
except:
break;
for k in filter(lambda x: max(hist) == x[1], enumerate(hist)):
print k[0] + 1 | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,155 |
s351632530 | p00028 | u579833671 | 1410774337 | Python | Python | py | Accepted | 20 | 4204 | 293 | count = [0] * 101
while(True):
try:
s = input()
count[s] += 1
except Exception:
break
maxCount = 0
for i in range(len(count)):
if(maxCount < count[i]):
maxCount = count[i]
for i in range(len(count)):
if(maxCount == count[i]):
print(i) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,156 |
s553942085 | p00028 | u579833671 | 1410774452 | Python | Python | py | Accepted | 20 | 4200 | 273 | count = [0] * 101
maxCount = 0
while(True):
try:
s = input()
count[s] += 1
if(maxCount < count[s]):
maxCount = count[s]
except Exception:
break
for i in range(len(count)):
if(maxCount == count[i]):
print(i) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,157 |
s986727906 | p00028 | u506132575 | 1416139864 | Python | Python | py | Accepted | 20 | 4396 | 214 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from datetime import date
n = [0]*101
for s in sys.stdin:
d = int(s)
n[d] += 1
m = max(n)
for i in [ j for j in range(len(n)) if n[j] == m ]:
print i | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,158 |
s160945092 | p00028 | u567380442 | 1422623653 | Python | Python3 | py | Accepted | 30 | 6724 | 235 | import sys
num_max = 0
frequency = [0] * 101
for line in sys.stdin:
num = int(line)
frequency[num] += 1
num_max = max(num_max, frequency[num])
for i in range(len(frequency)):
if num_max == frequency[i]:
print(i) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,159 |
s964873170 | p00028 | u879226672 | 1424761544 | Python | Python | py | Accepted | 10 | 4228 | 430 | dic={}
while True:
try:
n = int(raw_input())
if n not in dic:
dic[n] = 1
else:
dic[n] += 1
except:
break
mode = []
m = 0
for k,v in sorted(dic.items(),key = lambda x:x[1],reverse=True):
if m==0:
mode.append(k)
m +=1
if v ... | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,160 |
s869969376 | p00028 | u744114948 | 1426000908 | Python | Python3 | py | Accepted | 30 | 6724 | 173 | list=[0]*100
while True:
try:
n=int(input())
except:
break
list[n-1]+=1
max=max(list)
for i in range(len(list)):
if list[i]==max: print(i+1) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,161 |
s545590831 | p00028 | u540744789 | 1426609595 | Python | Python | py | Accepted | 20 | 4200 | 220 | import sys
integer=[0]*101
for dataset in sys.stdin:
integer[int(dataset)]+=1
max=list(integer)
max.sort()
smax=max.pop()
solve=[i for i in range(101) if integer[i]==smax]
while len(solve)!=0:
print solve.pop(0) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,162 |
s307484907 | p00028 | u534550471 | 1434573552 | Python | Python | py | Accepted | 20 | 4332 | 320 |
import sys
import math
l=[]
for i in range(101):
l.append(0)
while 1:
try:
a = int(raw_input())
l[a] += 1
except:
flag = 0
for i in range(101):
flag = max(flag, l[i])
for i in range(101):
if l[i] == flag:
print i
break | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,163 |
s908139504 | p00028 | u873482706 | 1434591729 | Python | Python | py | Accepted | 10 | 4220 | 470 | dic = {}
while True:
try:
num = int(raw_input())
if not num in dic:
dic[num] = 1
else:
dic[num] = dic[num] + 1
except EOFError:
max_num = 0
index = 0
for k, v in sorted(dic.items(), key=lambda x: x[1], reverse=True):
... | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,164 |
s993155279 | p00028 | u379956761 | 1435314922 | Python | Python3 | py | Accepted | 30 | 6724 | 201 | import sys
count = [0 for _ in range(101)]
mode = 0
for s in sys.stdin:
x = int(s)
count[x] += 1
mode = max(mode, count[x])
for i in range(101):
if count[i] == mode:
print(i) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,165 |
s968534853 | p00028 | u140201022 | 1444546237 | Python | Python | py | Accepted | 10 | 6224 | 164 | l=[0]*101
while 1:
try:
n=int(raw_input())
l[n]+=1
except:
break
chk=max(l)
for i,j in enumerate(l):
if j==chk:
print i | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,166 |
s582860577 | p00028 | u071010747 | 1445338662 | Python | Python3 | py | Accepted | 20 | 7624 | 600 | # -*- coding:utf-8 -*-
def main():
LIST=[]
while True:
try:
N=int(input())
flag=True
for item in LIST:
if item[0]==N:
index=LIST.index(item)
flag=False
if flag:
LIST.append([N,1])
... | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,167 |
s215508812 | p00028 | u775586391 | 1448338413 | Python | Python3 | py | Accepted | 20 | 7500 | 246 | import sys
l = []
max_c = 0
n = []
for i in sys.stdin.readlines():
l.append(int(i))
if l.count(int(i)) == max_c:
n.append(int(i))
elif l.count(int(i)) > max_c:
n = [int(i)]
max_c = l.count(int(i))
n.sort()
for i in n:
print(i) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,168 |
s146811632 | p00028 | u461370825 | 1449744528 | Python | Python | py | Accepted | 10 | 6328 | 227 | from math import *
PI = 3.1415926535898
res = [0]*111
arr = []
ans = 0
while True:
try:
n = input()
res[n] += 1
arr.append(n)
except EOFError:
break
ma = max(res)
for i in range(101):
if arr.count(i) == ma:
print i | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,169 |
s724947379 | p00028 | u075836834 | 1458751520 | Python | Python3 | py | Accepted | 20 | 7568 | 273 | A=[]
while True:
try:
x=int(input())
A.append(x)
except EOFError:
break
num=[]
for i in range(101):
num.append((A.count(i),i))
num.sort(reverse=True)
mode_value=num[0][0]
B=[]
for i in num:
if i[0]==mode_value:
B.append(i[1])
B.sort()
for i in B:
print(i) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,170 |
s613321483 | p00028 | u650459696 | 1458984834 | Python | Python3 | py | Accepted | 20 | 7504 | 203 | a = []
ary = [0] * 101
while True:
try:
c = int(input())
except EOFError:
break
a.append(c)
ary[c] += 1
for i in range(1, 101):
if ary[i] == max(ary):
print(i) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,171 |
s462284820 | p00028 | u148101999 | 1459391553 | Python | Python | py | Accepted | 10 | 6376 | 211 | #encoding=utf-8
import sys
num, ans = [], []
for i in sys.stdin:
num.append(int(i))
for i in xrange(1,101):
ans.append(num.count(i))
for i in xrange(1,100):
if max(ans) == ans[i]:
print i + 1 | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,172 |
s373148559 | p00028 | u966364923 | 1459427627 | Python | Python3 | py | Accepted | 50 | 7912 | 288 | import collections
import sys
cntr = collections.Counter()
for line in sys.stdin:
cntr[int(line)] += 1
lst = []
for k,v in cntr.items():
lst.append((v,k))
lst.sort()
t = len(lst)-1
while t>0 and lst[t][0] == lst[t-1][0]:
t -= 1
for i in range(t,len(lst)):
print(lst[i][1]) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,173 |
s204313459 | p00028 | u130979865 | 1460134580 | Python | Python | py | Accepted | 10 | 6288 | 309 | # -*- coding: utf-8 -*-
import sys
dic = {}
for line in sys.stdin:
i = int(line)
if i not in dic:
dic[i] = 1
else:
dic[i] += 1
Max = 0
for i in dic:
Max = max(Max, dic[i])
ans = []
for i in dic:
if dic[i] == Max:
ans.append(i)
ans.sort()
for i in ans:
print i | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,174 |
s980453892 | p00028 | u572790226 | 1460630020 | Python | Python3 | py | Accepted | 30 | 7680 | 200 | import sys
S = sys.stdin.readlines()
cnt = [0] * 101
for s in S:
n = int(s)
cnt[n] += 1
m = max(cnt)
n = cnt.count(m)
p = 0
for i in range(n):
p = cnt.index(m)
print(p)
cnt[p] = 0 | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,175 |
s037040806 | p00028 | u894114233 | 1463044096 | Python | Python | py | Accepted | 10 | 6316 | 161 | m=[0]*100
while 1:
try:
n=input()
m[n-1]+=1
except:
break
mmax=max(m)
for i in xrange(100):
if m[i]==mmax:
print(i+1) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,176 |
s963008768 | p00028 | u957021485 | 1465644354 | Python | Python3 | py | Accepted | 30 | 7624 | 171 | import sys
d = {}
for l in sys.stdin.readlines():
d[int(l)] = d.get(int(l), 0) + 1
l = sorted(d, key=d.get)
n = d[l[-1]]
for x in l:
if d[x] == n:
print(x) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,177 |
s511730956 | p00028 | u203261375 | 1466909108 | Python | Python3 | py | Accepted | 20 | 7620 | 292 |
import sys
arr = {}
for i in sys.stdin:
if int(i) in arr:
arr[int(i)] += 1
else:
arr[int(i)] = 1
max = 0
ans = []
for i in arr.keys():
if arr[i] > max:
ans = [i]
max = arr[i]
elif arr[i] == max:
ans.append(i)
for i in ans:
print(i) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,178 |
s925468870 | p00028 | u766477342 | 1468366293 | Python | Python3 | py | Accepted | 40 | 7960 | 205 | from collections import Counter
c = Counter()
try:
while 1:
c[int(input())] += 1
except:
pass
m = c.most_common(1)[0][1]
r = [n for n in c if c[n] == m]
r.sort()
for v in r:
print(v) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,179 |
s308612529 | p00028 | u300946041 | 1469014732 | Python | Python3 | py | Accepted | 30 | 7724 | 344 | # -*- coding: utf-8 -*-
DICT = {k: 0 for k in range(1, 101)}
def solve(d):
_max = max(d.values())
for k, v in sorted(d.items()):
if _max == v:
print(k)
if __name__ == '__main__':
while True:
try:
n = int(input())
DICT[n] += 1
except:
... | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,180 |
s499035614 | p00028 | u896025703 | 1469755093 | Python | Python3 | py | Accepted | 20 | 7692 | 330 | h = {}
while True:
try:
a = int(input())
if a in h:
h[a] += 1
else:
h[a] = 1
except EOFError:
break
#print(h)
l = [(mode, 10000 - num) for num, mode in h.items()]
l.sort(reverse=True)
max_mode, num = l[0]
print(10000 - num)
for i in range(1,1000):
if l[i][0] != max_mode: break
mode, num = l[i]
print(... | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,181 |
s659569806 | p00028 | u146816547 | 1471085585 | Python | Python | py | Accepted | 10 | 6252 | 180 | l = [0] * 101
while True:
try:
n = int(raw_input())
l[n] += 1
except EOFError:
break
max_num = max(l)
for i in range(1, 101):
if l[i] == max_num:
print i | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,182 |
s232834153 | p00028 | u582608581 | 1471510275 | Python | Python3 | py | Accepted | 20 | 7616 | 322 | numdict = dict()
while True:
try:
num = input()
if num not in numdict:
numdict[num] = 0
else:
numdict[num] += 1
except EOFError:
break
most = max(numdict.values())
mostlist = list()
for key in numdict:
if most == numdict[key]:
mostlist.append(int(key))
mostlist.sort()
for item in mostlist:
print(ite... | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,183 |
s352831169 | p00028 | u358919705 | 1471993351 | Python | Python3 | py | Accepted | 30 | 7636 | 196 | a = []
while True:
try:
a.append(int(input()))
except:
break
num = [a.count(i + 1) for i in range(100)]
for i in range(100):
if num[i] == max(num):
print(i + 1) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,184 |
s036507830 | p00028 | u379499530 | 1473148755 | Python | Python | py | Accepted | 10 | 6244 | 149 | n = [0] * 101
while 1:
try:
n[input()] += 1
except:
break
m = [i for i, x in enumerate(n) if x == max(n)]
for i in m: print i | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,185 |
s735179446 | p00028 | u922871577 | 1479443810 | Python | Python | py | Accepted | 10 | 6612 | 178 | import sys
from collections import Counter
C = Counter(int(line.rstrip()) for line in sys.stdin)
m = max(C.values())
for k in sorted(C.keys()):
if C[k] == m:
print k | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,186 |
s660888061 | p00028 | u777299405 | 1479970525 | Python | Python3 | py | Accepted | 50 | 7892 | 233 | import sys
import collections
l = []
for line in sys.stdin:
l.append(int(line))
counted = collections.Counter(l).most_common()
maxv = counted[0][1]
for k, v in counted:
if v == maxv:
print(k)
else:
break | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,187 |
s572138074 | p00028 | u777299405 | 1479970730 | Python | Python3 | py | Accepted | 30 | 7812 | 209 | import sys
import collections
l = []
for line in sys.stdin:
l.append(int(line))
counted = collections.Counter(l).most_common()
maxv = counted[0][1]
for k, v in counted:
if v == maxv:
print(k) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,188 |
s161310124 | p00028 | u301729341 | 1481123098 | Python | Python3 | py | Accepted | 20 | 7624 | 452 | kosu = [0] * 100
k = 1
while True:
try:
n = int(input())
kosu[n - 1] += 1
except (EOFError,ValueError):
ma = max(kosu)
num = kosu.index(ma) + k
print(num)
kosu.remove(max(kosu))
while True:
if ma > max(kosu):
b... | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,189 |
s743614006 | p00028 | u252368621 | 1481349233 | Python | Python3 | py | Accepted | 30 | 7484 | 183 | list=[0]*100
while(True):
try:
list[int(input())-1]+=1
except:
for i in range(100):
if list[i]==max(list):
print(i+1)
break | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,190 |
s874083745 | p00028 | u811733736 | 1481682360 | Python | Python3 | py | Accepted | 30 | 7952 | 575 | import sys
from collections import Counter
if __name__ == '__main__':
# ??????????????\???
# data = [5, 6, 3, 5, 8, 7, 5, 3, 9, 7, 3, 4]
data = []
for line in sys.stdin:
data.append(int(line.strip()))
# print(data)
# ?????????????¢????
c = Counter(data)
max_freq = c.most_commo... | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,191 |
s357834593 | p00028 | u546285759 | 1481887885 | Python | Python3 | py | Accepted | 30 | 7596 | 248 | import sys
from itertools import dropwhile
a = []
for v in sys.stdin:
a.append(int(v))
m = max([a.count(v) for v in set(a)])
try:
next(dropwhile(lambda x: True, (print(v) for v in set(a) if a.count(v) == m)))
except StopIteration:
pass | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,192 |
s280596112 | p00028 | u661290476 | 1482377194 | Python | Python3 | py | Accepted | 30 | 8008 | 251 | from collections import defaultdict as dd
a=dd(int)
freq=0
while True:
try:
b=int(input())
except:
break
a[b]+=1
if freq<a[b]:
freq=a[b]
ans=sorted([i for i,j in a.items() if j==freq])
for i in ans:
print(i) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,193 |
s202468780 | p00028 | u078042885 | 1483501047 | Python | Python3 | py | Accepted | 30 | 7500 | 163 | a=[0]*100
while 1:
try:
n=int(input())
a[n-1]+=1
except:
for i in range(100):
if a[i]==max(a): print(i+1)
break | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,194 |
s046703815 | p00028 | u711765449 | 1483970123 | Python | Python3 | py | Accepted | 20 | 7652 | 304 | # -*- coding:utf-8 -*-
array = []
while True:
try:
a = int(input())
array.append(a)
except EOFError:
break
data = [0]*101
for i in range(len(array)):
data[array[i]] += 1
m = [i for i,j in enumerate(data) if j == max(data)]
for i in range(len(m)):
print(m[i]) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,195 |
s109642509 | p00028 | u252414452 | 1486146380 | Python | Python | py | Accepted | 10 | 6348 | 239 | import sys
d={}
mode=0
while True:
n = sys.stdin.readline()
if not n: break
n = int(n)
if d.has_key(n):
d[n] = d[n]+1
else:
d[n] = 1
if mode < d[n]:
mode = d[n]
for k in d.keys():
if d[k] == mode:
print(k) | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,196 |
s820362381 | p00028 | u078042885 | 1486624938 | Python | Python3 | py | Accepted | 20 | 7744 | 111 | a=[0]*100
while 1:
try:a[int(input())-1]+=1
except:break
[print(i+1)for i in range(100)if a[i]==max(a)] | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,197 |
s489485957 | p00028 | u032662562 | 1486791193 | Python | Python3 | py | Accepted | 30 | 7544 | 329 | import operator
h = {}
while True:
try:
i = int(input())
if i in h:
h[i] += 1
else:
h[i] = 0
except EOFError:
break
h1=sorted(h.items(),key=operator.itemgetter(1),reverse=1)
val = h1[0][1]
h2 = sorted(filter(lambda x:x[1]==val, h1))
for i in h2:
pr... | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,198 |
s613686373 | p00028 | u072398496 | 1489289943 | Python | Python | py | Accepted | 10 | 6268 | 177 | import sys
counter = [0 for i in range(101)]
for n in sys.stdin:
n = int(n)
counter[n] = counter[n] + 1
m = max(counter)
for i in range(101):
if counter[i] == m:
print i | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,199 |
s076470238 | p00028 | u072398496 | 1489290075 | Python | Python | py | Accepted | 10 | 6280 | 128 | import sys
c=[0 for i in range(101)]
for n in sys.stdin:
n=int(n)
c[n]+=1
m=max(c)
for i in range(101):
if c[i]==m:
print i | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,200 |
s529399707 | p00028 | u072398496 | 1489290323 | Python | Python | py | Accepted | 10 | 6232 | 112 | import sys
c=[0]*101
for n in sys.stdin:
n=int(n)
c[n]+=1
m=max(c)
for i in range(101):
if c[i]==m:
print i | p00028 |
<h1>Mode Value</h1>
<p>
Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently.
</p>
<H2>Input</H2>
<p>
A sequence of integers <var>a<sub>i</sub></var> (1 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,201 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.