結果
| 問題 | No.32 貯金箱の憂鬱 |
| コンテスト | |
| ユーザー |
newoota0331
|
| 提出日時 | 2016-09-02 09:27:32 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 56 ms / 5,000 ms |
| コード長 | 677 bytes |
| 記録 | |
| コンパイル時間 | 1,567 ms |
| コンパイル使用メモリ | 81,992 KB |
| 実行使用メモリ | 46,480 KB |
| 最終ジャッジ日時 | 2026-04-03 12:10:41 |
| 合計ジャッジ時間 | 3,416 ms |
|
ジャッジサーバーID (参考情報) |
judge5_1 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
ソースコード
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
int yen1,yen25,yen100,coin;
yen100 = sc.nextInt();
yen25 = sc.nextInt();
yen1 = sc.nextInt();
coin = yen100+yen25+yen1;
while(coin!=0){
while(yen1>=25){
yen1-=25;
yen25+=1;
}
while(yen25>=4){
yen25-=4;
yen100+=1;
}
while(yen100>=10){
yen100-=10;
}
break;
}
System.out.println(yen1+yen25+yen100);
}
}
newoota0331