Codeforces 732A.Buy a Shovel

来源:互联网 发布:2016网络新词汇 编辑:程序博客网 时间:2024/06/11 00:25

链接http://codeforces.com/problemset/problem/732/A

#include<stdio.h>#include<iostream>using namespace std;int main(){    int k,r;    cin>>k>>r;    int i=1;    for(;;i++){        if((i*k%10==0)||(i*k-r)%10==0)            break;          }    printf("%d\n",i);    return 0;} 
0 0