luyencode / comments

Server lưu trữ bình luận trên Luyện Code
https://luyencode.net
6 stars 3 forks source link

https://oj.luyencode.net/problem/LDIGIT2 #747

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Chữ số cuối cùng 2 - Luyện Code Online

https://luyencode.net/problem/LDIGIT2

zhongli2k6 commented 2 years ago

code AC C++ màu mè ai cần: https://ideone.com/NNp00p

AnnNaa0511 commented 1 year ago

Code AC không dùng vòng lặp :>

Xem code AC

```cpp #include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(0);cout.tie(0); int a,n; cin>>a>>n; if(n==0) cout<<"1"; else{ int A=a%10; int N=n%4; if(N==0){ int rs=pow(A,4); cout<

sseu18042004 commented 1 year ago

testcase 9 la a=80 , n=0 nha moi người thử đáp án phải ra 1 mới chính xác

HuTaoVoTAo commented 1 year ago

mọi người cho em hỏi testcase 2 với ạ

uvnb195 commented 1 year ago

Java - Mình không giỏi thì mình phải chăm

Xem code AC

```java import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int m = sc.nextInt(), n = sc.nextInt(); BigInteger result = BigInteger.valueOf(m).modPow(BigInteger.valueOf(n), BigInteger.valueOf(10)); System.out.println(result); } } ```

nguyenlequa commented 1 year ago

ad ơi pending là lỗi gì ạ