/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 536.0 KiB
#2 Accepted 1ms 324.0 KiB
#3 Accepted 1ms 532.0 KiB
#4 Accepted 1ms 532.0 KiB

Code

#include <iostream>
using namespace std;

int main() {
    // Input the cost per kilogram of potato
    int X;
    cin >> X;

    // Calculate the total cost for 2 kilograms of potato
    int total_cost = X * 2;

    // Check if Sunny can buy 2 kilograms of potato
    if (total_cost <= 100) {
        cout << "YES\n";
    } else {
        cout << "NO\n";
    }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1056 Grown up boy sunny
Language
C++17 (G++ 13.2.0)
Submit At
2024-05-07 02:19:46
Judged At
2024-11-11 03:31:16
Judged By
Score
100
Total Time
1ms
Peak Memory
536.0 KiB