結果
問題 | No.128 お年玉(1) |
ユーザー |
![]() |
提出日時 | 2017-11-22 04:59:42 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 409 bytes |
コンパイル時間 | 849 ms |
コンパイル使用メモリ | 85,168 KB |
実行使用メモリ | 13,648 KB |
最終ジャッジ日時 | 2024-10-01 10:44:20 |
合計ジャッジ時間 | 7,537 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 TLE * 1 -- * 14 |
ソースコード
#include<iostream>#include<string>#include<algorithm>#include<cmath>#include<math.h>#include<iomanip>#include<stdio.h>#include<random>#include<ctime>#include<cstdlib>using namespace std;int main(){long long int n, ans=0;int m;cin >> n >> m;m*=1000;while(1){n-=m;ans+=1000;if(n<0){ans-=1000;cout << ans << endl;return 0;}}return 0;}