File tree 6 files changed +99
-2
lines changed
atcoder/abc/abc301-400/abc336
6 files changed +99
-2
lines changed Original file line number Diff line number Diff line change
1
+ use proconio:: input;
2
+
3
+ fn main ( ) {
4
+ input ! {
5
+ n: usize ,
6
+ }
7
+
8
+ let mut ans = String :: new ( ) ;
9
+
10
+ ans. push_str ( "L" ) ;
11
+ for i in 0 ..n {
12
+ ans. push_str ( "o" ) ;
13
+ }
14
+ ans. push_str ( "ng" ) ;
15
+
16
+ println ! ( "{}" , ans) ;
17
+ }
Original file line number Diff line number Diff line change
1
+ use proconio:: input;
2
+
3
+ fn ctz ( mut x : u32 ) -> u32 {
4
+ let mut res = 0 ;
5
+ while x & 1 == 0 {
6
+ x >>= 1 ;
7
+ res += 1 ;
8
+ }
9
+ res
10
+ }
11
+
12
+ fn main ( ) {
13
+ input ! {
14
+ n: u32 ,
15
+ }
16
+
17
+ println ! ( "{}" , ctz( n) ) ;
18
+ }
Original file line number Diff line number Diff line change
1
+ use proconio:: input;
2
+
3
+ fn decimal_to_quinary ( mut decimal : u64 ) -> String {
4
+ if decimal == 0 {
5
+ return String :: from ( "0" ) ;
6
+ }
7
+
8
+ let mut result = String :: new ( ) ;
9
+
10
+ while decimal > 0 {
11
+ let remainder = decimal % 5 ;
12
+ result = remainder. to_string ( ) + & result; // 数字を文字列に変換して前に追加
13
+ decimal /= 5 ;
14
+ }
15
+
16
+ result
17
+ }
18
+
19
+ fn main ( ) {
20
+ input ! {
21
+ n: u64 ,
22
+ }
23
+ let mut x = decimal_to_quinary ( n - 1 ) ;
24
+
25
+ x = x. replace ( "4" , "8" ) ;
26
+ x = x. replace ( "3" , "6" ) ;
27
+ x = x. replace ( "2" , "4" ) ;
28
+ x = x. replace ( "1" , "2" ) ;
29
+
30
+ println ! ( "{}" , x) ;
31
+ }
Original file line number Diff line number Diff line change
1
+ use proconio:: input;
2
+
3
+ fn decimal_to_quinary ( mut decimal : u64 ) -> String {
4
+ if decimal == 0 {
5
+ return String :: from ( "0" ) ;
6
+ }
7
+
8
+ let mut result = String :: new ( ) ;
9
+
10
+ while decimal > 0 {
11
+ let remainder = decimal % 5 ;
12
+ result = remainder. to_string ( ) + & result; // 数字を文字列に変換して前に追加
13
+ decimal /= 5 ;
14
+ }
15
+
16
+ result
17
+ }
18
+
19
+ fn main ( ) {
20
+ input ! {
21
+ n: u64 ,
22
+ }
23
+ let mut x = decimal_to_quinary ( n - 1 ) ;
24
+
25
+ x = x. replace ( "4" , "8" ) ;
26
+ x = x. replace ( "3" , "6" ) ;
27
+ x = x. replace ( "2" , "4" ) ;
28
+ x = x. replace ( "1" , "2" ) ;
29
+
30
+ println ! ( "{}" , x) ;
31
+ }
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ RUN add-apt-repository -y ppa:pypy/ppa &&\
52
52
RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
53
53
54
54
# Rust
55
- ENV RUST_VERSION 1.66.1
55
+ ENV RUST_VERSION 1.70.0
56
56
ENV RUST_HOME /home/${UNAME}/.cargo
57
57
ENV RUSTUP_HOME ${RUST_HOME}/rustup
58
58
ENV CARGO_HOME ${RUST_HOME}/cargo
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ test: run-test
11
11
# requier `docker login` before push
12
12
13
13
build-atcoder :
14
- docker build --build-arg UID=$(shell id -u) --build-arg UNAME=$(shell whoami) -t $(ATCODER_IMAGE ) -f dockerfiles/python. Dockerfile .
14
+ docker build --build-arg UID=$(shell id -u) --build-arg UNAME=$(shell whoami) -t $(ATCODER_IMAGE ) -f dockerfiles/Dockerfile .
15
15
docker push $(ATCODER_IMAGE )
16
16
17
17
ifeq ($(shell docker ps -a --format '{{.Names}}'| grep $(ATCODER_CONTAINER_NAME ) ) ,)
You can’t perform that action at this time.
0 commit comments