結果
| 問題 |
No.3240 Count 8 Included Numbers (Easy)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-08-22 21:28:53 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 557 bytes |
| コンパイル時間 | 3,512 ms |
| コンパイル使用メモリ | 275,312 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-08-22 21:29:30 |
| 合計ジャッジ時間 | 3,864 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 7 WA * 9 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define endl "\n"
signed main(){
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int n;cin>>n;
int m = n;
int x = m%10;
m/=10;
int y = m%10;
m/=10;
int z = m%10;
int ans = 19*z;
if(y<8){
ans += y;
if(x>=8)ans++;
}else{
if(y==8){
ans += y+1;
ans += x+1;
}else if(y==9){
if(x<8)ans += 18;
else ans += 19;
}
}
cout<<ans<<endl;
return 0;
}