Codeforces Round #450 (Div. 2) B
来源:互联网 发布:mac版的excel怎么换行 编辑:程序博客网 时间:2024/05/29 12:19
模拟一下除法
#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c; cin>>a>>b>>c; int k=0,i; for(int j=1;j<=100000;j++){ if(a*10<b&&a!=0){ i=0; a=a*10; } else{ a=a*10; i=a/b; a=a%b; } //cout<<a<<" "<<i<<endl; if(i==c){ cout<<j<<endl; return 0; } } cout<<"-1"<<endl; return 0;}
阅读全文
0 0
- Codeforces Round #450 (Div. 2)B
- Codeforces Round #450 (Div. 2) B
- Codeforces Round #450 (Div. 2) A题 + B题
- Codeforces Round #131 (Div. 2) A B
- Codeforces Round #134 (Div. 2)B. Airport
- Codeforces Round #170 (Div. 2) problem B
- Codeforces Round #173 (Div. 2) Problem B
- Codeforces Round #181 (Div. 2) B. Coach
- Codeforces Round #185 (Div. 2)--A,B
- Codeforces Round #171 (Div. 2) B
- Codeforces Round #169 (Div. 2) B题
- Codeforces Round #188 (Div. 2) B题
- Codeforces Round #192 (Div. 2) B
- Codeforces Round #203 (Div. 2) B. Resort
- Codeforces Round #206 (Div. 2) - b
- Codeforces Round #202 (Div. 2)B-贪心
- Codeforces Round #203 (Div. 2)B
- Codeforces Round #203(Div. 2)B. Resort
- 当单片机没有晶振?...
- 精华 | 12个关键词告诉你告诉你什么是机器学习(基础篇)
- JavaScript-substr(),substring(),slice(),split(),join()使用方法总结
- 软键盘设计的实现与代码分享(TP900掌机)
- java二维码
- Codeforces Round #450 (Div. 2) B
- c3p0连接池配置参数详解
- MySql的安装 图文详解
- 40个Java多线程问题总结
- 展示订单
- Delphi中组件Label、Edit、Tag、Memo、RichEdit
- 安卓自动运行任务工具
- 进制转换
- css计算函数calc 动态技术