結果
| 問題 | No.32 貯金箱の憂鬱 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2015-09-07 17:33:30 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 578 bytes | 
| コンパイル時間 | 610 ms | 
| コンパイル使用メモリ | 56,684 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-23 02:09:35 | 
| 合計ジャッジ時間 | 1,182 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 12 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:21: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |   int l, m, n; scanf("%d%d%d", &l, &m, &n);
      |                ~~~~~^~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
using i64 = long long;
class range {private: struct I{int x;int operator*(){return x;}bool operator!=(I& lhs){return x<lhs.x;}void operator++(){++x;}};I i,n;
public:range(int n):i({0}),n({n}){}range(int i,int n):i({i}),n({n}){}I& begin(){return i;}I& end(){return n;}};
int main(void) {
  int l, m, n; scanf("%d%d%d", &l, &m, &n);
  int money = 100 * l + 25 * m + n;
  money %= 1000;
  int res = money / 100;
  money %= 100;
  res += money / 25;
  money %= 25;
  res += money;
  printf("%d\n", res);
  return 0;
}
            
            
            
        