結果

問題 No.1184 Hà Nội
ユーザー RISE70226821
提出日時 2020-08-25 16:47:28
言語 Java
(openjdk 23)
結果
TLE  
実行時間 -
コード長 542 bytes
コンパイル時間 2,314 ms
コンパイル使用メモリ 74,360 KB
実行使用メモリ 61,156 KB
最終ジャッジ日時 2024-11-06 11:31:59
合計ジャッジ時間 9,570 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20 TLE * 1 -- * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.lang.*;
import java.io.*;

public class Main {
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		// 入力
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		long L = sc.nextLong();
		long DIV = 998244353L;
		
		// 計算
		long disc = N / L;
		if(N % L != 0){
			disc++;
		}
		
		long ope = 1L;
		for(int i = 1; i <= disc; i++){
			ope = (ope * 2) % DIV;
		}
		ope--;
		
		// 出力
		System.out.println(ope);
	}
}
0