提出 #43338094


ソースコード 拡げる

// Problem: A - Nine
// Contest: AtCoder - Denso Create Programming Contest 2023 (AtCoder Beginner Contest 309)
// URL: https://atcoder.jp/contests/abc309/tasks/abc309_a
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
// 
// Powered by CP Editor (https://cpeditor.org)

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(x) (x).begin(), (x).end()
const double PI = 4*atan(1);
template<typename T>
void chmax(T& a, T const b) { a = max(a, b); }
template<typename T>
void chmin(T& a, T const b) { a = min(a, b); }
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9+7;
const int MAX_N = 2e6+10;

int a, b;

void solve()
{
	a--, b--;
	if((a/3 == b/3) && b-a==1){
		cout<<"Yes\n";
	}else{
		cout<<"No\n";
	}
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr); cout.tie(nullptr);
	cin >> a >> b;
	solve();
	return 0;
}

提出情報

提出日時
問題 A - Nine
ユーザ zzar
言語 C++ (GCC 9.2.1)
得点 100
コード長 1051 Byte
結果 AC
実行時間 8 ms
メモリ 3596 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 13
セット名 テストケース
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt
ケース名 結果 実行時間 メモリ
example_00.txt AC 7 ms 3480 KiB
example_01.txt AC 3 ms 3532 KiB
example_02.txt AC 2 ms 3532 KiB
test_00.txt AC 8 ms 3572 KiB
test_01.txt AC 3 ms 3460 KiB
test_02.txt AC 3 ms 3480 KiB
test_03.txt AC 3 ms 3484 KiB
test_04.txt AC 6 ms 3460 KiB
test_05.txt AC 2 ms 3532 KiB
test_06.txt AC 2 ms 3572 KiB
test_07.txt AC 2 ms 3596 KiB
test_08.txt AC 2 ms 3532 KiB
test_09.txt AC 2 ms 3508 KiB