编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#24325 #2038. 奇怪巧克力 Accepted 100 755 ms 11008 K Java / 1.3 K 192024211559 2024-12-21 14:33:49
显示原始代码
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) {
        Main h = new Main();
        h.solution();
    }
    public void solution() {
        IO io = new IO();
        int t = io.nextInt();
        while (t-- > 0) {
            int n = io.nextInt();
            int cnt = n / 10;
            if (n % 10 == 9)
                cnt++;
            io.println(cnt);
        }
        io.flush();
    }
    class IO extends PrintWriter {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        public IO() {
            super(System.out);
        }
        public String next() {
            try {
                while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
                return st.nextToken();
            } catch (Exception e) {
            }
            return null;
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }
}
子任务 #1
Accepted
得分:100
测试点 #1
Accepted
得分:100
用时:86 ms
内存:10564 KiB

输入文件(0.in

5
1
9
114
19198
514

答案文件(0.out

0
1
11
1919
51

用户输出

0
1
11
1919
51

系统信息

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

输入文件(1.in

1000
95324
61540
86129
35867
62059
82282
62131
43185
49381
80751
31826
6083
27015
4913
<6785 bytes omitted>

答案文件(1.out

9532
6154
8613
3586
6206
8228
6213
4318
4938
8075
3182
608
2701
4913
3127
1833
9650
<5780 bytes omitted>

用户输出

9532
6154
8613
3586
6206
8228
6213
4318
4938
8075
3182
608
2701
4913
3127
1833
9650
8186
2970
3243
718
4825
3976
2863
1556
6604

<4752 bytes omitted>

系统信息

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

输入文件(2.in

1000
17745
71669
93371
81156
88161
23430
6313
98209
26939
57480
75687
60159
19717
4227
<6799 bytes omitted>

答案文件(2.out

1774
7167
9337
8115
8816
2343
631
9821
2694
5748
7568
6016
1971
4227
5315
8181
8484
<5793 bytes omitted>

用户输出

1774
7167
9337
8115
8816
2343
631
9821
2694
5748
7568
6016
1971
4227
5315
8181
8484
9736
3804
8169
2815
538
6225
7665
2678
6667

<4765 bytes omitted>

系统信息

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

输入文件(3.in

1000
34424
63718
43483
25260
96406
73603
13641
96951
15053
34194
73611
97434
28235
816
<6784 bytes omitted>

答案文件(3.out

3442
6371
4348
2526
9640
7360
1364
9695
1505
3419
7361
9743
2823
8166
2661
9109
4598
<5778 bytes omitted>

用户输出

3442
6371
4348
2526
9640
7360
1364
9695
1505
3419
7361
9743
2823
8166
2661
9109
4598
2623
513
9638
4561
9140
3750
9284
9935
6185
<4750 bytes omitted>

系统信息

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

输入文件(4.in

1000
566
18020
58024
89934
29166
63405
3947
68946
8831
83994
7861
24754
90590
76989
3
<6794 bytes omitted>

答案文件(4.out

56
1802
5802
8993
2916
6340
394
6894
883
8399
786
2475
9059
7699
3132
5525
4528
840
<5788 bytes omitted>

用户输出

56
1802
5802
8993
2916
6340
394
6894
883
8399
786
2475
9059
7699
3132
5525
4528
8407
4163
5939
501
1985
6512
9274
8590
9073
2669
<4760 bytes omitted>

系统信息

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

输入文件(5.in

1000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<5391906 bytes omitted>

答案文件(5.out

0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
3
3
3
3
3
3
<4303 bytes omitted>

用户输出

0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
3
3
3
3
3
3
3
3
3
3
4
4
4
4
4
4
4
4
4
4
5
5
5
5
5
5
5
5
5
5
6
6
6
6
6
6

<3275 bytes omitted>

系统信息

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

输入文件(6.in

1000
100000
99999
99998
99997
99996
99995
99994
99993
99992
99991
99990
99989
99988
99
<6907 bytes omitted>

答案文件(6.out

10000
10000
9999
9999
9999
9999
9999
9999
9999
9999
9999
9999
9998
9998
9998
9998
99
<5902 bytes omitted>

用户输出

10000
10000
9999
9999
9999
9999
9999
9999
9999
9999
9999
9999
9998
9998
9998
9998
9998
9998
9998
9998
9998
9998
9997
9997
9997
9
<4874 bytes omitted>

系统信息

Exited with return code 0