結果
問題 |
No.152 貯金箱の消失
|
ユーザー |
|
提出日時 | 2019-07-21 05:46:45 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 232 bytes |
コンパイル時間 | 632 ms |
コンパイル使用メモリ | 59,392 KB |
実行使用メモリ | 10,152 KB |
最終ジャッジ日時 | 2025-01-03 00:18:12 |
合計ジャッジ時間 | 31,488 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 TLE * 5 |
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] 5 | main() | ^~~~
ソースコード
#include<iostream> using namespace std; int L,ans; int gcd(int a,int b){return b?gcd(b,a%b):a;} main() { cin>>L; L/=4; for(int n=1;2*n<=L;n++)for(int m=1;m<n&&2*n*(n+m)<=L;m++) { ans+=gcd(n-m,2*n*m)==1; } cout<<ans<<endl; }