結果

問題 No.128 お年玉(1)
コンテスト
ユーザー ちよちゃん
提出日時 2016-05-20 17:11:25
言語 Java
(openjdk 25.0.2)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
AC  
実行時間 60 ms / 5,000 ms
コード長 695 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,291 ms
コンパイル使用メモリ 82,204 KB
実行使用メモリ 41,800 KB
最終ジャッジ日時 2026-04-17 11:12:58
合計ジャッジ時間 4,630 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

package yukicoder;

import java.util.Scanner;

public class Yuki11 {
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		long m = scan.nextLong();
		
		// System.out.println( "1番目=" + m * 1000 );
		// System.out.println( "2番目=" + n / (m * 1000) );
		
		long ans = n / ( m * 1000 ) * 1000;
    	System.out.println(ans);
		
		/*
		final int thousand = 1000;
		
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		int m = scan.nextInt();
		scan.close();
		
	    if(n >= m*thousand && m > 0){
	    	System.out.println(thousand*(n/(m*thousand)));
	    }else{
	    	System.out.println(0);
	    }
	    */
		
	}
}
0