結果
| 問題 | No.3689 LCM Sum (Easy Version) |
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2026-09-07 16:16:49 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 30 ms / 2,000 ms |
| + 735µs | |
| コード長 | 490 bytes |
| 記録 | |
| コンパイル時間 | 236 ms |
| コンパイル使用メモリ | 54,572 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-09-07 16:16:51 |
| 合計ジャッジ時間 | 1,498 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 3689.cc: No.3689 LCM Sum (Easy Version) - yukicoder
*/
#include<cstdio>
#include<algorithm>
#include<numeric>
using namespace std;
/* constant */
const int MOD = 998244353;
/* typedef */
/* global variables */
/* subroutines */
/* main */
int main() {
int a, b;
scanf("%d%d", &a, &b);
int sum = 0;
for (int i = 1; i <= a; i++)
for (int j = 1; j <= b; j++)
sum = (sum + lcm(i, j)) % MOD;
printf("%d\n", sum);
return 0;
}
tnakao0123