No.1352 Three Coins
レベル :
/ AI推定難易度 : 1150
/ 実行時間制限 : 1ケース 2.000秒 / メモリ制限
: 512 MB / 標準ジャッジ問題
タグ : / 解いたユーザー数 85
作問者 :
PCTprobability
/ テスター :
KoD
maguro
blackyuki
タグ : / 解いたユーザー数 85
作問者 :
PCTprobability
/ テスター :
KoD
maguro
問題文最終更新日: 2021-01-16 17:46:36
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
灘中入試コンテストday2
(順位表)
の他の問題:
Problem Statement
You are given positive integers $A,B,C$.
Print the number of positive integers that cannot be expressed in the form $xA+yB+zC$ using non-negative integers $x,y,z$. If there are infinitely many such integers, print INF.
Input
$A$ $B$ $C$
- All inputs are positive integers.
- $1 \le A,B,C \le 2000$
Output
Print the number of positive integers that cannot be expressed in the form $xA+yB+zC$ using non-negative integers $x,y,z$. If there are infinitely many such integers, print INF. Print a newline at the end.
Sample
Sample 1
Input
2 3 4
Output
1
$1$ is the only positive integer that cannot be expressed in the form $2x+3y+4z$.
Sample 2
Input
45 68 23
Output
484
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。