結果
問題 |
No.2681 ゲームセンターの両替
|
ユーザー |
![]() |
提出日時 | 2024-03-29 00:33:03 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 544 bytes |
コンパイル時間 | 2,595 ms |
コンパイル使用メモリ | 244,360 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-09-30 14:54:29 |
合計ジャッジ時間 | 3,460 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 WA * 10 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { ll c, y; cin >> c >> y; if (y / 100 < c) { cout << "can't exchange" << endl; } else if ((y % 500) / 100 >= c) { cout << "no exchange" << endl; } else { ll rem = c - (y % 500) / 100; cout << (5 - rem % 5) % 5 + rem << endl; } return 0; }