結果
| 問題 | No.32 貯金箱の憂鬱 |
| コンテスト | |
| ユーザー |
newoota0331
|
| 提出日時 | 2016-09-02 09:27:32 |
| 言語 | Java (openjdk 26.0.2.1) |
| 結果 |
AC
|
| 実行時間 | 56 ms / 5,000 ms |
| + 870µs | |
| コード長 | 677 bytes |
| 記録 | |
| コンパイル時間 | 1,380 ms |
| コンパイル使用メモリ | 83,432 KB |
| 実行使用メモリ | 42,880 KB |
| 最終ジャッジ日時 | 2026-08-23 17:12:01 |
| 合計ジャッジ時間 | 3,236 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_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