結果

問題 No.128 お年玉(1)
ユーザー Yatsuku
提出日時 2015-12-15 19:46:35
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 425 bytes
コンパイル時間 1,828 ms
コンパイル使用メモリ 73,964 KB
実行使用メモリ 56,316 KB
最終ジャッジ日時 2024-10-01 10:10:42
合計ジャッジ時間 5,688 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5 RE * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


class No_128 {
	public static void main(String args[]) {
		Scanner stdIn = new Scanner(System.in);

		int budget = stdIn.nextInt();
		int persons = stdIn.nextInt();

		int count = 0;
		while ( true ) {
			if ( count * (persons * 1000) == budget ) {
				break;
			}
			if ( count * (persons * 1000) > budget ) {
				count--;
				break;
			}
			count++;
		}
		System.out.println(1000 * count);
	}
}
0