結果
問題 |
No.1656 Recuperation
|
ユーザー |
![]() |
提出日時 | 2021-08-02 19:17:59 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 102 ms / 2,000 ms |
コード長 | 332 bytes |
コンパイル時間 | 144 ms |
コンパイル使用メモリ | 28,800 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-21 00:15:08 |
合計ジャッジ時間 | 1,036 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 3 |
コンパイルメッセージ
main.c: In function 'main': main.c:20:3: warning: implicit declaration of function 'usleep'; did you mean 'sleep'? [-Wimplicit-function-declaration] 20 | usleep(100*1000); | ^~~~~~ | sleep
ソースコード
#include <stdio.h> #include <unistd.h> int t; long long a,b,ans,now; int main(){ scanf("%d",&t); for(int i=0;i<t;i++){ scanf("%lld%lld",&a,&b); ans=0; now=0; for(long long j=0;j<b;j++){ now+=a; ans++; } for(;now>0;now--){ ans++; } printf("%lld\n",ans); } usleep(100*1000); }