結果
| 問題 |
No.1281 Cigarette Distribution
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-06 23:20:00 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,800 bytes |
| コンパイル時間 | 326 ms |
| コンパイル使用メモリ | 82,268 KB |
| 実行使用メモリ | 91,268 KB |
| 最終ジャッジ日時 | 2024-07-22 13:42:25 |
| 合計ジャッジ時間 | 5,490 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 23 |
ソースコード
from __future__ import print_function
import sys
sys.setrecursionlimit(500000)
import re
import array
import copy
import functools
import operator
import math
import string
import fractions
from fractions import Fraction
import collections
import itertools
import bisect
import random
import time
import heapq
from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace
from queue import PriorityQueue as pq
from queue import Queue
from itertools import accumulate
from collections import deque
from collections import Counter
from operator import mul
from functools import reduce
input = sys.stdin.readline
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
return
# from fractions import gcd
# from math import gcd
# def lcm(n, m):
# return int(n * m / gcd(n, m))
# def coprimize(p, q):
# common = gcd(p, q)
# return (p // common, q // common)
# def find_gcd(list_l):
# x = reduce(gcd, list_l)
# return x
def combinations_count(n, r):
r = min(r, n - r)
numer = reduce(mul, range(n, n - r, -1), 1)
denom = reduce(mul, range(1, r + 1), 1)
return numer // denom
mod = 1000000007
def combinations_count_mod(n, r):
r = min(r, n - r)
numer = reduce(lambda x,y: x*y%mod, range(n, n - r, -1), 1)
denom = pow( reduce(lambda x,y: x*y%mod, range(1, r + 1), 1) , mod-2, mod)
return numer * denom % mod
# def solve():
n,m = map(int,input().strip().split())
# n,m = int(input().strip())
for x in range(m): # 箱がx個
ans = 0
if n<x:
ans = 0
else:
n1,n2 = n//x,n%x # n1回の「まとまった操作」,n2回の「あまり回数の操作」
ans += n1 * x
ans += n2
print(ans)