結果

問題 No.1406 Test
ユーザー harurunharurun
提出日時 2021-02-26 21:23:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 1,603 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 13,056 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-04-10 11:53:30
合計ジャッジ時間 1,895 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,880 KB
testcase_01 AC 32 ms
11,008 KB
testcase_02 AC 32 ms
11,008 KB
testcase_03 AC 30 ms
10,880 KB
testcase_04 AC 31 ms
10,880 KB
testcase_05 AC 31 ms
11,008 KB
testcase_06 AC 30 ms
10,880 KB
testcase_07 AC 31 ms
10,880 KB
testcase_08 AC 31 ms
10,880 KB
testcase_09 AC 31 ms
11,008 KB
testcase_10 AC 31 ms
10,880 KB
testcase_11 AC 33 ms
11,008 KB
testcase_12 AC 32 ms
10,880 KB
testcase_13 AC 31 ms
11,008 KB
testcase_14 AC 31 ms
11,008 KB
testcase_15 AC 30 ms
10,880 KB
testcase_16 AC 31 ms
11,008 KB
testcase_17 AC 30 ms
10,880 KB
testcase_18 AC 31 ms
11,008 KB
testcase_19 AC 31 ms
11,008 KB
testcase_20 AC 30 ms
10,880 KB
testcase_21 AC 32 ms
11,008 KB
testcase_22 AC 31 ms
10,880 KB
testcase_23 AC 30 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#解説AC
class INPUT:
  def __init__(self):
    from sys import argv
    if argv[-1] in ["./Main.py","prog.py","Main.py"]:#Atcoder:./Main.py,Wandbox:prog.py,yukicoder:Main.py
      self.l=open(0).read().split()[::-1]
    else:
      self.l=open("_input.txt",mode="r").read().split()[::-1]
    self.length=len(self.l)
    return

  def stream(self,k=1,f=int,f2=False):
    assert(-1<k)
    m=self.length
    if m==0 or m<k:
      raise Exception("There is no input!")
    elif f!=str:
      if k==0:
        self.length=0
        return list(map(f,self.l[::-1]))
      if k==1 and not f2:
        self.length-=1
        return f(self.l.pop())
      if k==1 and f2:
        self.length-=1
        return [f(self.l.pop())]
      ret=[]
      for _ in [0]*k:
        ret.append(f(self.l.pop()))
      self.length-=k
      return ret
    else:
      if k==0:
        self.length=0
        return self.l[::-1]
      if k==1 and not f2:
        self.length-=1
        return self.l.pop()
      if k==1 and f2:
        self.length-=1
        return [self.l.pop()]
      ret=[]
      for _ in [0]*k:
        ret.append(self.l.pop())
      self.length-=k
      return ret
pin=INPUT().stream

"""
pin(number[default:1],f[default:int],f2[default:False])
if number==0 -> return left all
eclipse 等では_input.txtを使うこと。
listを変数で受け取るとき、必ずlistをTrueにすること。
"""
from collections import Counter
def main():
  N=pin()
  if N==1:
    return print(101)
  A=pin(0)
  ans=0
  s=sum(A)
  for i in range(0,101):
    if (s+i)%N==0:
      ans+=1
  return print(ans)

main()

  
0