結果
問題 | No.2269 eN!の整数部分の下1桁 |
ユーザー |
|
提出日時 | 2024-06-15 18:45:40 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 29 ms / 2,000 ms |
コード長 | 329 bytes |
コンパイル時間 | 1,661 ms |
コンパイル使用メモリ | 79,368 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-15 18:45:44 |
合計ジャッジ時間 | 3,207 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
#include <iostream>constexpr int a[] = {1, 2, 5, 6, 5, 6, 7, 0, 1, 0};inline int solve() noexcept {int64_t n;std::cin >> n;if(n == 0) {return 2;}return a[n % 10];}int main() {std::cin.tie(nullptr) -> sync_with_stdio(false);int t;std::cin >> t;while(t--) {std::cout << solve() << '\n';}}