結果

問題 No.810 割った余りの個数
ユーザー kuuso1
提出日時 2019-04-12 22:27:43
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 2,000 ms
コード長 517 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-14 20:12:21
合計ジャッジ時間 1,970 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin
##  input functions for me
def ria(sep = ''):
    if sep == '' :
        return list(map(int, input().split())) 
    else: return list(map(int, input().split(sep)))
def rsa(sep = ''):
    if sep == '' :
        return input().split() 
    else: return input().split(sep)
def ri(): return int(input())
def rd(): return float(input())
def rs(): return input()
##

## main ##
L, R, M = map(int, input().split())
if(L == R):
    print(1)
else:
    print((R - L + 1) % M if (R - L + 1) < M else M)


0