#include<stdio.h>//这题挺有意思小学学的算盘

int main() {

int n,i,m;

while(scanf("%d",&n)!=EOF) {

if(n==0) {

printf("O-|-OOOO\n");

continue;

}

while(n) {

m=n%10;

if(m>=5) {

printf("-O|");

m-=5;

}

else

printf("O-|");

for(i=1;i<=m;i++)

printf("O");

printf("-");

for(i=m+1;i<5;i++)

printf("O");

printf("\n");

n/=10;

}

}

return 0;

}

codeforces 363A的更多相关文章

  1. Codeforces 363A Soroban

    模拟算盘 #include<bits/stdc++.h> using namespace std; int main() { char s[20]; scanf("%s" ...

  2. codeforces #363a Launch of Collider

    A. Launch of Collider time limit per test 2 seconds memory limit per test 256 megabytes input standa ...

  3. python爬虫学习(5) —— 扒一下codeforces题面

    上一次我们拿学校的URP做了个小小的demo.... 其实我们还可以把每个学生的证件照爬下来做成一个证件照校花校草评比 另外也可以写一个物理实验自动选课... 但是出于多种原因,,还是绕开这些敏感话题 ...

  4. 【Codeforces 738D】Sea Battle(贪心)

    http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n g ...

  5. 【Codeforces 738C】Road to Cinema

    http://codeforces.com/contest/738/problem/C Vasya is currently at a car rental service, and he wants ...

  6. 【Codeforces 738A】Interview with Oleg

    http://codeforces.com/contest/738/problem/A Polycarp has interviewed Oleg and has written the interv ...

  7. CodeForces - 662A Gambling Nim

    http://codeforces.com/problemset/problem/662/A 题目大意: 给定n(n <= 500000)张卡片,每张卡片的两个面都写有数字,每个面都有0.5的概 ...

  8. CodeForces - 274B Zero Tree

    http://codeforces.com/problemset/problem/274/B 题目大意: 给定你一颗树,每个点上有权值. 现在你每次取出这颗树的一颗子树(即点集和边集均是原图的子集的连 ...

  9. CodeForces - 261B Maxim and Restaurant

    http://codeforces.com/problemset/problem/261/B 题目大意:给定n个数a1-an(n<=50,ai<=50),随机打乱后,记Si=a1+a2+a ...

随机推荐

  1. Optimizing Downloads for Efficient Network Access

    Optimizing Downloads for Efficient Network Access Previous  Next 1.This lesson teaches you to Unders ...

  2. Robot Framework and Ride

    Robot framework是诺西(NSN)开源的一套自动化测试工具,在通信设备自动化测试中很实用,它基于Python开发,主要模拟NMS网管配置数据到网元NODE,并读取配置看配置是否生效,ECI ...

  3. [BZOJ1798][AHOI2009]Seq维护序列 线段树

    题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1798 一眼看过去线段树,事实上就是线段树.对于乘和加的两个标记,我们可以规定一个顺序,比如 ...

  4. DOM,javascript,Web API之间的关系——onclick 引起的思考与调研

    平时习惯了用js操作dom树来与html页面进行交互,基本都是通过web API接口实现的,最近看闭包和原生js的知识点比较多,昨天无意中看到了onclick中的this指向问题,遂用native j ...

  5. java debug源码完整版

    第一步:现在myeclipse或者eclipse中下载jad插件,将class文件翻译成java文件 点击下载安装 第二步:创建一个java工程,导出成jar包.jdk自带的jar包不包含debug ...

  6. 总结几点sql语句优化

    一.表设计阶段: 1.主键的使用    a.业务日志表.安全审计表采用自增长:    b.自定义编号用于业务流程类表,根据一定的编号规则:    c.int型主键 用于基础数据表: 2.逻辑删除字段的 ...

  7. Swift Intermediate Language (SIL)

    Swift Intermediate Language (SIL) https://github.com/apple/swift/blob/master/docs/SIL.rst#witness-me ...

  8. Go语言 之md5加密

    //方式一 func getMd5String1(str string) string { m := md5.New() _, err := io.WriteString(m, str) if err ...

  9. VS2008 ActiveX(ocx控件)的调试工具ActiveX Control Test Container安装说明

    vs2008中的TSTCON( ActiveX Control Test Container )工具非自动安装,而是作为一个例程提供.所以应找到该例程,并编译: 如vs2008安装在默认路径则 1, ...

  10. JAVA基础——设计模式之观察者模式

    观察者模式是对象的行为模式,又叫发布-订阅(Publish/Subscribe)模式.模型-视图(Model/View)模式.源-监听器(Source/Listener)模式或从属者(Dependen ...