結果
問題 | No.1723 [Cherry 3rd Tune *] Dead on |
ユーザー |
![]() |
提出日時 | 2022-09-30 08:24:15 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 544 bytes |
コンパイル時間 | 494 ms |
コンパイル使用メモリ | 29,440 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-22 18:38:59 |
合計ジャッジ時間 | 2,369 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
#include<stdio.h> int main() { long long int x, a, y, b; scanf("%lld %lld %lld %lld", &x, &a, &y, &b); long long int c1, c2, i; for (i = 2; i * i <= y; i++) { if (y % i > 0) continue; for (c1 = 0; x % i == 0; c1 += a, x /= i); for (c2 = 0; y % i == 0; c2 += b, y /= i); if (c1 < c2) { printf("No\n"); return 0; } } if (y > 1) { i = y; for (c1 = 0; x % i == 0; c1 += a, x /= i); for (c2 = 0; y % i == 0; c2 += b, y /= i); if (c1 < c2) { printf("No\n"); return 0; } } printf("Yes\n"); return 0; }