結果
| 問題 |
No.2624 Prediction by Average
|
| コンテスト | |
| ユーザー |
Today03
|
| 提出日時 | 2024-02-10 03:08:13 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 507 bytes |
| コンパイル時間 | 1,966 ms |
| コンパイル使用メモリ | 191,944 KB |
| 最終ジャッジ日時 | 2025-02-19 04:30:36 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 1 WA * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:15:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
15 | scanf("%lld %lld.%lld",&N,&fi,&se);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
#ifdef LOCAL
#include "./debug.cpp"
#else
#define debug(...)
#define print_line
#endif
using namespace std;
using ll=long long;
int main(){
int T;cin>>T;
while(T--){
ll N,fi,se;
scanf("%lld %lld.%lld",&N,&fi,&se);
ll score=fi*1000+se;
ll ans=0;
for(int i=1;i<=min(N,1000ll);i++){
ll sum=score*i;
if(sum/i==score&&(sum%1000<=1))ans++;
}
ans+=max(0ll,N-1000);
cout<<ans<<endl;
}
}
Today03