提出 #71999720
ソースコード 拡げる
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define int long long
#define ALL(x) (x).begin(), (x).end()
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
typedef pair<int, int> PI;
typedef pair<int, pair<int, int>> PII;
static const int INF = 1010000000000000017LL;
static const double eps = 1e-12;
static const double pi = 3.14159265358979323846;
static const int dx[4] = {1, -1, 0, 0};
static const int dy[4] = {0, 0, 1, -1};
static const int ddx[8] = {1, -1, 0, 0, 1, 1, -1, -1};
static const int ddy[8] = {0, 0, 1, -1, 1, -1, 1, -1};
template <class T>
inline bool chmin(T& a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T>
inline bool chmax(T& a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
int D, F;
signed main() {
cin >> D >> F;
cout << F + ((D - F) / 7) * 7 + 7 - D << endl;
}
提出情報
ジャッジ結果
| セット名 |
Sample |
All |
| 得点 / 配点 |
0 / 0 |
100 / 100 |
| 結果 |
|
|
| セット名 |
テストケース |
| Sample |
sample00.txt, sample01.txt |
| All |
sample00.txt, sample01.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt |
| ケース名 |
結果 |
実行時間 |
メモリ |
| sample00.txt |
AC |
1 ms |
3364 KiB |
| sample01.txt |
AC |
1 ms |
3532 KiB |
| testcase00.txt |
AC |
1 ms |
3624 KiB |
| testcase01.txt |
AC |
1 ms |
3588 KiB |
| testcase02.txt |
AC |
1 ms |
3364 KiB |
| testcase03.txt |
AC |
1 ms |
3548 KiB |
| testcase04.txt |
AC |
1 ms |
3492 KiB |
| testcase05.txt |
AC |
1 ms |
3624 KiB |
| testcase06.txt |
AC |
1 ms |
3364 KiB |
| testcase07.txt |
AC |
1 ms |
3384 KiB |
| testcase08.txt |
AC |
1 ms |
3492 KiB |
| testcase09.txt |
AC |
1 ms |
3484 KiB |
| testcase10.txt |
AC |
1 ms |
3588 KiB |
| testcase11.txt |
AC |
1 ms |
3492 KiB |