結果

問題 No.888 約数の総和
ユーザー pekempeypekempey
提出日時 2019-10-01 19:19:27
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 2,099 bytes
コンパイル時間 1,097 ms
コンパイル使用メモリ 75,628 KB
実行使用メモリ 13,888 KB
最終ジャッジ日時 2024-04-14 08:39:39
合計ジャッジ時間 4,635 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
9,884 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,944 KB
testcase_03 AC 2 ms
6,940 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 2 ms
6,944 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 2 ms
6,944 KB
testcase_10 AC 2 ms
6,944 KB
testcase_11 AC 2 ms
6,940 KB
testcase_12 AC 2 ms
6,940 KB
testcase_13 AC 2 ms
6,940 KB
testcase_14 AC 2 ms
6,940 KB
testcase_15 AC 2 ms
6,940 KB
testcase_16 AC 2 ms
6,944 KB
testcase_17 AC 2 ms
6,940 KB
testcase_18 TLE -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

// https://github.com/pekempey/banana
// -------------------------------------------
// sig i64 -> i64
// let countdivs n =
//   let mut res = 0i64 in
//   let mut i = 1 in
//   while i * i <= n do
//     if n % i == 0 then begin
//       res += i;
//       if n / i <> i then
//         res += n / i
//     end;
//     i += 1
//   done;
//   res in
// 
// let n = readi64 () in
// println (countdivs n)
// -------------------------------------------
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <string>
struct unit {};
using i32 = int;
using i64 = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using string = std::string;
template<class T> unit print(T a) { std::cout << a; return unit(); }
template<class T> unit println(T a) { std::cout << a << '\n'; return unit(); }
i32 readi32(unit _) { i32 a; std::cin >> a; return a; }
i64 readi64(unit _) { i64 a; std::cin >> a; return a; }
u32 readu32(unit _) { u32 a; std::cin >> a; return a; }
u64 readu64(unit _) { u64 a; std::cin >> a; return a; }
string readstring(unit _) { string a; std::cin >> a; return a; }
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
std::cout << std::fixed << std::setprecision(15);
auto _1=[&](auto _0)->i64{
constexpr i64 _6=0;
auto _3=_6;
constexpr i32 _7=1;
auto _4=_7;
while(true){
auto &_8=_4;
auto &_9=_4;
auto _10=_8*_9;
auto &_11=_0;
auto _12=_10<=_11;
if(!(_12))break;
auto &_13=_0;
auto &_14=_4;
auto _15=_13%_14;
constexpr i32 _16=0;
auto _17=_15==_16;
unit _33;
if(_17){
auto &_18=_4;
_3+=_18;
unit _19;
auto &_20=_0;
auto &_21=_4;
auto _22=_20/_21;
auto &_23=_4;
auto _24=_22!=_23;
unit _30;
if(_24){
auto &_25=_0;
auto &_26=_4;
auto _27=_25/_26;
_3+=_27;
unit _28;
_30=_28;
} else {
unit _29;
_30=_29;
}
auto _31=_30;
_33=_31;
} else {
unit _32;
_33=_32;
}
constexpr i32 _34=1;
_4+=_34;
unit _35;
auto _36=_35;
}
unit _37;
auto &_38=_3;
auto _39=_38;
auto _40=_39;
auto _41=_40;
return _41;
};
unit _42;
auto _43=readi64(_42);
auto _2=_43;
auto &_44=_2;
auto _45=_1(_44);
auto _46=println(_45);
auto _47=_46;
unit _48=_47;
}
0