結果
| 問題 | No.1162 Many Quotients hard |
| ユーザー |
|
| 提出日時 | 2020-10-07 21:46:45 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 352 ms / 2,000 ms |
| コード長 | 277 bytes |
| 記録 | |
| コンパイル時間 | 387 ms |
| コンパイル使用メモリ | 73,792 KB |
| 実行使用メモリ | 81,764 KB |
| 最終ジャッジ日時 | 2026-04-02 20:26:06 |
| 合計ジャッジ時間 | 5,371 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 42 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main()
| ^~~~
ソースコード
#include<iostream>
using namespace std;
long N;
main()
{
cin>>N;
long ans=0;
while((ans+1)*(ans+1)<=N)ans++;
long r=N/(ans+1);
while(r>=1)
{
long t=N/r;
long l=N/(t+1);
if(l+1==r)
{
ans+=r;
break;
}
r=l;
cout<<r<<endl;
ans++;
}
cout<<ans<<endl;
}