結果
| 問題 |
No.2269 eN!の整数部分の下1桁
|
| コンテスト | |
| ユーザー |
momoyuu
|
| 提出日時 | 2023-04-15 10:18:39 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 426 bytes |
| コンパイル時間 | 2,634 ms |
| コンパイル使用メモリ | 244,800 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-10 22:43:34 |
| 合計ジャッジ時間 | 4,669 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 WA * 11 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
int t;
cin>>t;
while(t--){
ll n;
cin>>n;
int ans = 0;
int now = n % 10;
n--;
while(now!=0){
ans += now;
ans %= 10;
int nxt = n % 10;
now *= nxt;
n--;
}
ans++;
ans%=10;
cout<<ans<<endl;
}
}
momoyuu