結果

問題 No.128 お年玉(1)
ユーザー maki17
提出日時 2017-02-05 22:58:18
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 461 bytes
コンパイル時間 3,546 ms
コンパイル使用メモリ 74,584 KB
実行使用メモリ 54,664 KB
最終ジャッジ日時 2024-10-01 10:31:19
合計ジャッジ時間 6,985 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 2 WA * 3 RE * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class sample128 {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
	int b = scan.nextInt();
        if(a <= 1000){
            System.out.println(a/b);
        }else if((a/b) >= 1000){
            int komakai = a / b;
            int kettei = komakai - (a/b)%1000;
            System.out.println(kettei);
        }
            
               
    }
}
0