結果
問題 | No.136 Yet Another GCD Problem |
ユーザー |
![]() |
提出日時 | 2023-10-08 18:07:10 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 303 bytes |
コンパイル時間 | 2,845 ms |
コンパイル使用メモリ | 243,408 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-26 18:10:35 |
合計ジャッジ時間 | 4,336 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 WA * 25 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int ans = 1; int n,k; cin>>n>>k; for(int i = 1;i<=n;i++){ if(n%i!=0) continue; if((long)i*k<=n) ans = i; } cout<<ans<<endl; }