結果

問題 No.415 ぴょん
ユーザー tenten
提出日時 2020-10-14 16:23:29
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 320 bytes
コンパイル時間 3,075 ms
コンパイル使用メモリ 74,184 KB
実行使用メモリ 41,532 KB
最終ジャッジ日時 2024-07-20 19:10:30
合計ジャッジ時間 8,042 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	int d = sc.nextInt();
    	if (n % d == 0) {
    	    System.out.println(n / d - 1);
    	} else {
    	    System.out.println((n % d + 1) * (n / d));
    	}
	}
}
0