编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#33563 #2027. youngmagician笑传之谁才是奶龙 Accepted 100 1624 ms 52684 K Java / 2.6 K yingwenzha 2025-03-22 22:25:32
显示原始代码
import java.io.BufferedInputStream;
import java.io.IOException;
public class Main {
    public static void main(String[] args) throws IOException {
        FastInput in = new FastInput();
        String n = in.nextString();
        if (n.length() > 8) {
            System.out.println("No");
            return;
        }

        while (true) {
            int temp = 0;
            for (int i = 0; i < n.length(); i++) {
                temp += n.charAt(i) - '0';
            }
            n = String.valueOf(temp);
            if (temp < 10) {
                break;
            }
        }

        if (Integer.parseInt(n) == 7) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}
class FastInput {
    private final BufferedInputStream in;
    private final byte[] buffer;
    private int bufferPointer, bytesRead;

    public FastInput() {
        in = new BufferedInputStream(System.in, 1 << 16);
        buffer = new byte[1 << 16];
        bufferPointer = bytesRead = 0;
    }

    private int read() throws IOException {
        if (bufferPointer == bytesRead) {
            bytesRead = in.read(buffer, 0, buffer.length);
            bufferPointer = 0;
            if (bytesRead == -1)
                return -1;
        }
        return buffer[bufferPointer++];
    }

    public int nextInt() throws IOException {
        int result = 0;
        byte c = (byte) read();
        while (c <= ' ') {
            c = (byte) read();
        }
        boolean negative = (c == '-');
        if (negative)
            c = (byte) read();
        do {
            result = result * 10 + (c - '0');
            c = (byte) read();
        } while (c >= '0' && c <= '9');
        return negative ? -result : result;
    }

    public long nextLong() throws IOException {
        long result = 0;
        byte c = (byte) read();
        while (c <= ' ') {
            c = (byte) read();
        }
        boolean negative = (c == '-');
        if (negative)
            c = (byte) read();
        do {
            result = result * 10 + (c - '0');
            c = (byte) read();
        } while (c >= '0' && c <= '9');
        return negative ? -result : result;
    }

    public String nextString() throws IOException {
        StringBuilder sb = new StringBuilder();
        byte c = (byte) read();
        while (c <= ' ') {
            c = (byte) read();
        }
        do {
            sb.append((char) c);
            c = (byte) read();
        } while (c > ' ');
        return sb.toString();
    }
}
子任务 #1
Accepted
得分:100
测试点 #1
Accepted
得分:100
用时:87 ms
内存:10664 KiB

输入文件(1.in

5775011063024882839675041352132771513506335802724953772403207907230441142550365553460020082790920954
<15640 bytes omitted>

答案文件(1.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #2
Accepted
得分:100
用时:88 ms
内存:10744 KiB

输入文件(2.in

2197467255332646778039293622468404857480717548063610866066679591003110208947242126044383072519380598
<17991 bytes omitted>

答案文件(2.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #3
Accepted
得分:100
用时:92 ms
内存:10732 KiB

输入文件(3.in

3803140663113028031664407651169308894585380503801339209644300130240641260931462211652106965020550095
<26409 bytes omitted>

答案文件(3.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #4
Accepted
得分:100
用时:87 ms
内存:10804 KiB

输入文件(4.in

1396006958884900860383476378496157822761714632510060373713768621769524605829216162187524006852769739
<10815 bytes omitted>

答案文件(4.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #5
Accepted
得分:100
用时:83 ms
内存:10204 KiB

输入文件(5.in

8283627635336843187529625694752180296966344360221784283137959279061423062134942660211399749454292022
<454 bytes omitted>

答案文件(5.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #6
Accepted
得分:100
用时:229 ms
内存:52684 KiB

输入文件(6.in

5514294818778186532444472876981170531896357836952176547051019523795047598718418229496827827705315402
<9999902 bytes omitted>

答案文件(6.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #7
Accepted
得分:100
用时:85 ms
内存:10512 KiB

输入文件(7.in

1749149007071842854428838340383136111736532034516409117171959530085096212289188940492242922230517976
<4176 bytes omitted>

答案文件(7.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #8
Accepted
得分:100
用时:82 ms
内存:10504 KiB

输入文件(8.in

1523812486161630743833242846654846984537008172638451824134883831280293644778835202633086562859944733
<78 bytes omitted>

答案文件(8.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #9
Accepted
得分:100
用时:87 ms
内存:10636 KiB

输入文件(9.in

2208322310384196752355336050832009007124168042195315340373722629516561681279583248569683823063634421
<16849 bytes omitted>

答案文件(9.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #10
Accepted
得分:100
用时:87 ms
内存:10592 KiB

输入文件(10.in

1860514598330108852433106097103663898698271383192929762260087101891130870610163653968464558381781754
<19564 bytes omitted>

答案文件(10.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #11
Accepted
得分:100
用时:88 ms
内存:10660 KiB

输入文件(11.in

9361524519353584102812608776641395951951161607041277848746146993754793056273222017579605803507133857
<8524 bytes omitted>

答案文件(11.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #12
Accepted
得分:100
用时:88 ms
内存:10684 KiB

输入文件(12.in

7868836113649698201890485287782084040127601998448091448802102597472598246762923276181953439086336526
<1718 bytes omitted>

答案文件(12.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #13
Accepted
得分:100
用时:85 ms
内存:10692 KiB

输入文件(13.in

5339293156788243929992809489285504140740234393312458642630387728932424939520464157361973758028566002
<13044 bytes omitted>

答案文件(13.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #14
Accepted
得分:100
用时:92 ms
内存:10588 KiB

输入文件(14.in

1772824276017332104497893565954410673919279202082052912247365779097023285498772815882465711959200345
<22294 bytes omitted>

答案文件(14.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #15
Accepted
得分:100
用时:92 ms
内存:10708 KiB

输入文件(15.in

8188058953936232148261859191841855288677331683468423511601214394029454377387686414651323591233200275
<28468 bytes omitted>

答案文件(15.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #16
Accepted
得分:100
用时:88 ms
内存:10748 KiB

输入文件(16.in

1575634836093365963863687833228370523910250106052818060915161173812241849975328897455565745023688571
<19130 bytes omitted>

答案文件(16.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0
测试点 #17
Accepted
得分:100
用时:84 ms
内存:10588 KiB

输入文件(17.in

2898677265990333394149236686051413168400873569473887760749739993260268618381322962152758354458779936
<7854 bytes omitted>

答案文件(17.out

N0

用户输出

No

Special Judge 信息

Accepted!

系统信息

Exited with return code 0