zoukankan      html  css  js  c++  java
  • poj2183

    简单题

    View Code
    #include <iostream>
    #include
    <cstdio>
    #include
    <cstdlib>
    #include
    <cstring>
    using namespace std;

    #define maxn 1000000

    int n;
    int vis[maxn];

    int main()
    {
    //freopen("t.txt", "r", stdin);
    scanf("%d", &n);
    memset(vis,
    -1, sizeof(vis));
    int i = 0;
    while (1)
    {
    if (vis[n] != -1)
    break;
    vis[n]
    = i;
    n
    = n / 10 % 10000;
    n
    = n * n;
    n
    %= 1000000;
    i
    ++;
    }
    printf(
    "%d %d %d\n", n, i - vis[n], i);
    return 0;
    }
  • 相关阅读:
    5
    4
    2
    3
    1
    IOS js交互
    vm安装mac
    索引
    ORM 基础
    reids 日志no
  • 原文地址:https://www.cnblogs.com/rainydays/p/2122783.html
Copyright © 2011-2022 走看看