結果
問題 | No.32 貯金箱の憂鬱 |
ユーザー |
|
提出日時 | 2022-07-15 16:57:02 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 132 ms / 5,000 ms |
コード長 | 747 bytes |
コンパイル時間 | 3,840 ms |
コンパイル使用メモリ | 76,272 KB |
実行使用メモリ | 41,608 KB |
最終ジャッジ日時 | 2024-06-27 11:48:59 |
合計ジャッジ時間 | 5,957 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
import java.util.*;public class no32 {public static void main(String[] args) {Scanner sc = new Scanner(System.in);int hundred = sc.nextInt();int tw5 = sc.nextInt();int one = sc.nextInt();int cnt = 0;int keep = 0;int sum = 0;if (one != 0) {cnt = one / 25;one = one % 25;}tw5 += cnt;cnt = 0;if(tw5 != 0){cnt = tw5 / 4;tw5 = tw5 % 4;}hundred += cnt;if(hundred != 0){cnt = hundred / 10;hundred = hundred % 10;}sum = hundred + tw5 + one;System.out.println(sum);}}