結果
問題 | No.32 貯金箱の憂鬱 |
ユーザー |
![]() |
提出日時 | 2016-09-02 09:27:32 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 137 ms / 5,000 ms |
コード長 | 677 bytes |
コンパイル時間 | 2,006 ms |
コンパイル使用メモリ | 74,608 KB |
実行使用メモリ | 54,312 KB |
最終ジャッジ日時 | 2024-07-23 02:24:23 |
合計ジャッジ時間 | 4,282 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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);}}