結果

問題 No.3659 CONSTRUCTION 1,2,3
コンテスト
ユーザー Rapca1256
提出日時 2026-08-30 15:49:18
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 1,048 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 298 ms
コンパイル使用メモリ 21,284 KB
実行使用メモリ 15,868 KB
最終ジャッジ日時 2026-08-30 15:49:36
合計ジャッジ時間 5,536 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 3 WA * 5 TLE * 1 -- * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
import math
#from collections import deque, defaultdict, Counter
#import heapq
#import bisect
#import itertools
#import functools

# 外部ライブラリ(AtCoder環境で利用可能)
#from sortedcontainers import SortedList, SortedSet, SortedDict
#from atcoder.dsu import DSU
#from atcoder.segtree import SegTree
#from atcoder.lazysegtree import LazySegTree
#from atcoder.fenwicktree import FenwickTree

# 入力高速化
#input = sys.stdin.readline
# 再帰回数上限

# よくあるmod
#MOD = 1000000007
MOD = 998244353

from collections import Counter

def solve():
    # 解答ここから
    A, B, C = map(int, input().split(' '))
    if (A + B + C) % 6 != 0:
        print("No")
        return

    while A > 0 and B > 0 and C > 0:
        A, B, C = max(A, B, C), A + B + C -max(A, B, C) - min(A, B, C) , min(A, B, C)
        if A - C == 2:
            print("Yes")
            return
        A -= 3
        B -= 2
        C -= 1

    print("No")
if __name__ == '__main__':
    T = 1
    for _ in range(T):
        solve()
0