SGU107 水题 Easy
来源:互联网 发布:淘宝找不到卖家中心 编辑:程序博客网 时间:2024/04/30 00:26
Problem: For given number N you must output amount of N-digit numbers, such, that last digits of their square is equal to 987654321.
解法:编个程找规律,然后直接写。
Solution: Write a program to find the rules then you will know how to deal with it.
#include <iostream>#include <stdio.h>#include <cstring>using namespace std;int n;int main() { while (~scanf("%d",&n)) { if (n<=8) printf("0"); else if (n==9) printf("8"); else { printf("72"); n -= 10; while (n--) printf("0"); } printf("\n"); } return 0;}
0 0
- SGU107 水题 Easy
- SGU107
- sgu107
- sgu107
- sgu107 987654321 problem
- sgu107 987654321 problem 规律
- sgu107:987654321 problem
- SGU107 987654321 problem
- SGU107——987654321 problem
- SGU107. 987654321 problem 暴利找规律
- SGU水题大集合 SGU104 SGU105 SGU107
- SGU112 水题 Easy
- SGU113 水题 Easy Problem
- SGU114 水题 Easy Problem
- SGU115 水题 Too Easy
- SGU117 水题 Easy
- easy
- Easy
- 游戏服务器之lua脚本系统
- 收集的学习书籍及相关网站
- mapr-3.0下载源
- Today
- Universal Image Loader for Android一些方法的参数
- SGU107 水题 Easy
- 歌唱大赛评分系统
- rpm包安装没有反应
- 感冒初期试试食疗方 盲目用药伤脾胃
- MySQL学习总结
- mybatis写mapper文件注意事项
- python django
- 顺序存储的栈
- XMLHttpRequest对象的创建