結果
問題 |
No.128 お年玉(1)
|
ユーザー |
![]() |
提出日時 | 2016-06-14 11:35:31 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 519 bytes |
コンパイル時間 | 2,065 ms |
コンパイル使用メモリ | 74,032 KB |
実行使用メモリ | 61,140 KB |
最終ジャッジ日時 | 2024-10-01 10:20:49 |
合計ジャッジ時間 | 17,016 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 WA * 2 TLE * 1 -- * 6 |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); long budget = scan.nextLong(); int numOfKids = scan.nextInt(); long handselAmount = 0; if(budget % numOfKids == 0){ handselAmount = budget / numOfKids; }else{ int handselAmountBase = 1000; while(handselAmount * numOfKids < budget){ handselAmount += handselAmountBase; } handselAmount -= 1000; } System.out.println(handselAmount); scan.close(); } }