結果
| 問題 |
No.32 貯金箱の憂鬱
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-15 16:56:21 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 749 bytes |
| コンパイル時間 | 3,310 ms |
| コンパイル使用メモリ | 74,628 KB |
| 実行使用メモリ | 41,732 KB |
| 最終ジャッジ日時 | 2024-06-27 11:47:57 |
| 合計ジャッジ時間 | 5,545 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 10 |
ソースコード
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 / 25;
tw5 = tw5 % 25;
}
hundred += cnt;
if(hundred != 0){
cnt = hundred / 10;
hundred = hundred % 10;
}
sum = hundred + tw5 + one;
System.out.println(sum);
}
}