Official
A - Health M Death Editorial by en_translator
If you are new to learning programming and do not know where to start, please try Problem A “Welcome to AtCoder” from practice contest. There you can find a sample code for each language.
In this problem, it is sufficient to check if \(H\) is a multiple of \(M\). In many languages, %
is used as an operator of finding “the remainder of \(H\) divided by \(M\).”
Sample Code (C)
#include<stdio.h>
int main(){
int m,h;
scanf("%d%d",&m,&h);
if(h%m==0)puts("Yes");
else puts("No");
}
Sample Code (Python)
M,H=map(int,input().split())
if H%M==0:
print("Yes")
else:
print("No")
posted:
last update: