提出 #72005073
ソースコード 拡げる
// AD ASTRA
#include <bits/stdc++.h> // 万能头
using namespace std;
// 类型简写
using ll = long long;
using pii = pair<int, int>;
// 宏定义,追求极致的短
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
#define rep(i, a, b) for (int i = (a); i <= (b); ++i) // 循环简写
// 常量
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const int N = 2e5 + 10; // 预估的最大数组大小
void solve() {
int d, f;
cin >> d >> f;
while (f + 7 < d) {
f = (f + 7) % d;
}
int ans = (f + 7) % d;
cout << (ans ? ans : 7) << endl;
}
int main() {
// IO 加速,必写!
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t = 1;
solve();
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - First Contest of the Year |
| ユーザ | b1uebird |
| 言語 | C++23 (GCC 15.2.0) |
| 得点 | 100 |
| コード長 | 840 Byte |
| 結果 | AC |
| 実行時間 | 1 ms |
| メモリ | 3704 KiB |
コンパイルエラー
./Main.cpp: In function 'int main()':
./Main.cpp:36:9: warning: unused variable 't' [-Wunused-variable]
36 | int t = 1;
| ^
ジャッジ結果
| セット名 | 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 | 3704 KiB |
| sample01.txt | AC | 1 ms | 3564 KiB |
| testcase00.txt | AC | 1 ms | 3544 KiB |
| testcase01.txt | AC | 1 ms | 3544 KiB |
| testcase02.txt | AC | 1 ms | 3492 KiB |
| testcase03.txt | AC | 1 ms | 3544 KiB |
| testcase04.txt | AC | 1 ms | 3432 KiB |
| testcase05.txt | AC | 1 ms | 3544 KiB |
| testcase06.txt | AC | 1 ms | 3416 KiB |
| testcase07.txt | AC | 1 ms | 3492 KiB |
| testcase08.txt | AC | 1 ms | 3700 KiB |
| testcase09.txt | AC | 1 ms | 3468 KiB |
| testcase10.txt | AC | 1 ms | 3576 KiB |
| testcase11.txt | AC | 1 ms | 3544 KiB |